submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s762165595 | p00480 | C++ | #include
#include
#include
using namespace std;
int main(void)
{
long long hist[100][21];
int n;
int form[100];
scanf("%d", &n);
for (int i = 0; i < n; i++){
scanf("%d", &form[i]);
}
memset(hist, 0, sizeof(hist));
hist[0][form[0]] = 1;
for (int i = 1; i < ... | a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
1 | #include
| ^
a.cc:2:10: error: #include expects "FILENAME" or <FILENAME>
2 | #include
| ^
a.cc:3:10: error: #include expects "FILENAME" or <FILENAME>
3 | #include
| ^
a.cc: In function 'int main()':
... |
s086756802 | p00480 | C++ | a,d;int main(b){long long int t[21][2];for(scanf("%d%d",&a,&b);d<21;d++)t[d][a&1]=!(b-d);for(;--a-1&&scanf("%d",&b);)for(d=0;d<21;t[d++][a&1]=((b>d?0:t[d-b][!(a&1)])+((b<(21-d))?t[b+d][!(a&1)]:0)));scanf("%d",&b),printf("%lld",t[b][0]);} | a.cc:1:1: error: 'a' does not name a type
1 | a,d;int main(b){long long int t[21][2];for(scanf("%d%d",&a,&b);d<21;d++)t[d][a&1]=!(b-d);for(;--a-1&&scanf("%d",&b);)for(d=0;d<21;t[d++][a&1]=((b>d?0:t[d-b][!(a&1)])+((b<(21-d))?t[b+d][!(a&1)]:0)));scanf("%d",&b),printf("%lld",t[b][0]);}
| ^
a.cc:1:9: error: canno... |
s184783885 | p00480 | C++ |
#include<cstdio>
#include<cstring>
int main(){
int table[100][21],N,a;
memset(table,0,sizeof(table));
scanf("%d",&N);
scanf("%d",&a);
table[0][a]=1;
for(int i=1;i<N-1;i++){
scanf("%d",&a);
for(int j=0;j<=21;j++){
if(j+i<=21)table[i][j]+=table[j+i];
if(j-i<=21)table[i][j]+=table[j-i];
}
}
scanf("%... | a.cc: In function 'int main()':
a.cc:13:47: error: invalid conversion from 'int*' to 'int' [-fpermissive]
13 | if(j+i<=21)table[i][j]+=table[j+i];
| ~~~~~~~~~~~^~~~~~~~~~~~
| |
| ... |
s419421505 | p00480 | C++ | vector<int> nums;
ll dp[110][25];
ll dfs(int n, int sum){
ll result = 0;
if(sum < 0 || sum > 20) return 0;
if(dp[n][sum] >= 0) return dp[n][sum];
if(n == nums.size() - 1) {
if(nums[n] == sum) return 1;
}
result = dfs(n+1,sum + nums[n]) + dfs(n+1,sum - nums[n]);
return dp[n][sum] = result;
}
int main(){
int N;... | a.cc:1:1: error: 'vector' does not name a type
1 | vector<int> nums;
| ^~~~~~
a.cc:2:1: error: 'll' does not name a type
2 | ll dp[110][25];
| ^~
a.cc:3:1: error: 'll' does not name a type
3 | ll dfs(int n, int sum){
| ^~
a.cc: In function 'int main()':
a.cc:15:13: error: 'i' was not decla... |
s611402668 | p00480 | C++ | //情報オリンピック2010予選問4「一年生」#include<stdio.h> long long c[21]; void ck(int, int[], int); int main(void){ int n, f1, j[100]; long long out; scanf("%d",&n); for(f1 = 0; f1 < n; f1++) scanf("%d",&j[f1]); for(f1 = 0; f1 < 21; f1++) c[f1] = 0; c[ j[0] ] = 1; ck(n, j, 1); out = c[ j[n-... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s327225961 | p00480 | C++ | #include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iom... | a.cc: In function 'int main()':
a.cc:56:2: error: expected '}' at end of input
56 | }
| ^
a.cc:31:11: note: to match this '{'
31 | int main(){
| ^
|
s443417676 | p00480 | C++ | #include <iostream>
using namespace std;
typedef long long ll;
int main(){
int n, s, r;
cin >> n;
ll dp[101][40];
memset(dp, 0, sizeof(dp));
dp[0][9] = 1;
for(int i = 1; i < n; i++){
cin >> s;
for(int j = 9; j <= 29; j++){
if(dp[i-1][j] != 0){
dp[i][j+s] += dp[i-1][j];
... | a.cc: In function 'int main()':
a.cc:12:3: error: 'memset' was not declared in this scope
12 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 ... |
s266632268 | p00480 | C++ | #include <iostream>
using namespace std;
int dp[101][21];
int main(void){
int n;
cin >> n;
int num[101];
for( int i = 0 ; i < n ; i++ ){
cin >> num[i];
}
dp[0][num[0]] = 1;
for( int j = 1 ; j < n ; j++ ){
for( int i = 0 ; i < 21 ; i++ ){
if( i + num[j] <= 20 )
dp[j][i + num[j]] += dp[... | a.cc: In function 'int main()':
a.cc:23:35: error: two consecutive '[' shall only introduce an attribute before '[' token
23 | dp[j][i - num[j]] += dp[j][[i];
| ^
|
s939249283 | p00480 | C++ | //線形探索やら範囲探索?やらすると、計算量が半端ない。正解の解の数自体が多すぎるので、限定もしづらい。
//N回目に符号をつける数は、どのパターンでも一緒であるので、
//N-1回目までに演算して出てきた値が同じのものは、N回目の演算における結果が一致する。
//結果のバリエーションが少なく、結果が同じものはその前に依存せず、次の結果も同じになる。
//よって、結果によって処理をまとめておこなう、動的計画法とやらが使えそう。
#include<stdio.h>
int main(){
FILE *fp1,*fp2;
int num;
int i,j,d,ans;
long long data[99][21] = {0};... | a.cc: In function 'int main()':
a.cc:20:24: error: cannot convert 'const char*' to 'FILE*'
20 | fscanf("%d",&d);
| ^~~~
| |
| const char*
In file included from a.cc:6:
/usr/include/stdio.h:422:37: note: initializ... |
s606494034 | p00480 | C++ | #include<iostream>
#include<math.h>
using namespace std;
long number[101];
long numbers[101][21][50];
int N;
int last;
long canNumber(long numbers[],int value,int time ){
int n=value;
long sum=0;
if(time==N-1){
if(value==last ){
return 1;
}
return 0;
}
if(value>=0 && value<=20 ){
sum+=can... | a.cc:72:1: error: expected declaration before '}' token
72 | }
| ^
|
s242754429 | p00480 | C++ | #include<iostream>
using namespace std;
long number[101];
long numbers[101][21][50];
int N;
int last;
long canNumber(long numbers[],int value,int time ){
int n=value;
long sum=0;
if(time==N-1){
if(value==last ){
return 1;
}
return 0;
}
if(value>=0 && value<=20 ){
sum+=canNumber(numbers,n... | a.cc:72:1: error: expected declaration before '}' token
72 | }
| ^
|
s405456545 | p00480 | C++ | #include<iostream>
using namespace std;
long number[101];
long numbers[101][21][50];
int N;
int last;
long canNumber(long numbers[],int value,int time ){
int n=value;
long sum=0;
if(time==N-1){
if(value==last ){
return 1;
}
return 0;
}
if(value>=0 && value<=20 ){
sum+=canNumber(numbers,n... | a.cc:72:1: error: expected declaration before '}' token
72 | }
| ^
|
s093976535 | p00480 | C++ | #include <stdio.h>
long long int main(){
long long int resultcalc, result;
long long int dp[101][21] = {0};
int plus[100] = {0};
int number, i, j, k;
scanf("%d", &number);
for(i = 1;i <= number - 1;i++){
scanf("%d ", &plus[i]);
}
scanf("%d", &resultcalc);
dp[0][0] = 1;
for(j = 1;j < number;j++){
for(k = ... | a.cc:3:11: error: '::main' must return 'int'
3 | long long int main(){
| ^~~
|
s634297859 | p00480 | C++ | #include<iostream>
int n;
int v[101];
long long dp[101][21];
long long calc(int i,int j){
if(j>20||j<0)return 0;
if(dp[i][j]!=-1)return dp[i][j];
if(i==n-1&&j==v[n-1])return 1;
else if(i==n-1&&j!=v[n-1])return 0;
long long ans=0;
ans+=calc(i+1,j+v[i]);
ans+=calc(i+1,j-v[i]);
return dp[i][j]=ans;
}
int main(... | a.cc: In function 'int main()':
a.cc:20:9: error: 'memset' was not declared in this scope
20 | memset(dp,-1,sizeof(dp));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstri... |
s651010731 | p00480 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for( int i = 0; i < n; i++ )
typedef vector<int> vec;
int main(){
int n;
cin >> n;
vec fml(n);
rep(i, n){
cin >> fml[i];
}
long long int dp[101][21];
memset( dp, 0, sizeof(dp) );
dp[1][fml[0]] = 1;
... | a.cc: In function 'int main()':
a.cc:15:5: error: 'memset' was not declared in this scope
15 | memset( dp, 0, sizeof(dp) );
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector>
+++ |+#include <cstring>
... |
s700849587 | p00480 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
#define rep(i, n) for( int i = 0; i < n; i++ )
typedef vector<int> vec;
int main(){
int n;
cin >> n;
vec fml(n);
rep(i, n){
cin >> fml[i];
}
long long int dp[101][21];
memset( dp, 0, sizeof(dp) );
dp[1]... | a.cc: In function 'int main()':
a.cc:16:5: error: 'memset' was not declared in this scope
16 | memset( dp, 0, sizeof(dp) );
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector>
+++ |+#include <cstring>
... |
s596975386 | p00480 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
#define rep(i, n) for( int i = 0; i < n; i++ )
typedef vector<int> vec;
int main(){
int n;
cin >> n;
vec fml(n);
rep(i, n){
int num;
cin >> num;
fml[i] = num;
}
long long int dp[101][21];
me... | a.cc: In function 'int main()':
a.cc:18:5: error: 'memset' was not declared in this scope
18 | memset( dp, 0, sizeof(dp) );
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector>
+++ |+#include <cstring>
... |
s755730472 | p00480 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <cstdio>
using namespace std;
#define rep(i, n) for( int i = 0; i < n; i++ )
typedef vector<int> vec;
int main(){
int n;
cin >> n;
vec fml(n);
rep(i, n){
cin >> fml[i];
}
long long int dp[101][21];
memset( dp, 0, sizeo... | a.cc: In function 'int main()':
a.cc:17:5: error: 'memset' was not declared in this scope
17 | memset( dp, 0, sizeof(dp) );
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <cstdio>
+++ |+#include <cstring>
... |
s342176847 | p00480 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
#define rep(i, n) for( int i = 0; i < n; i++ )
typedef vector<int> vec;
int main(){
int n;
cin >> n;
vec fml(n);
rep(i, n){
cin >> fml[i];
}
long long int dp[101][21];
memset( dp, 0, sizeof(dp) );
dp[1]... | a.cc: In function 'int main()':
a.cc:16:5: error: 'memset' was not declared in this scope
16 | memset( dp, 0, sizeof(dp) );
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector>
+++ |+#include <cstring>
... |
s377618341 | p00480 | C++ | #include<iostream>
using namespace std;
#define MAX 110
long long int DP[MAX][MAX];
int target;
int input[MAX];
int n;
int dfs_end;
long long int dfs(int now , int sum)
{
if (now == dfs_end)
{
if (sum == target)
{
return 1;
}
return 0;
}
if (sum > 20 || 0 > sum)
{
return 0;
}
if (DP[now][sum] !... | a.cc: In function 'int main()':
a.cc:42:9: error: 'memset' was not declared in this scope
42 | memset(DP , 0 , sizeof(DP));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cs... |
s093433704 | p00480 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
typedef long long Int;
Int dp[105][25];
int main(){
cin >> n;
for(int i = 0;i < n - 1;i++)cin >> num[i];
cin >> ans;
dp[0][num[0]] = 1;
for(int i = 1;i < n - 1;i++){
for(int j = 0;j < 20;j++){
if(j - num[i] >= 0)dp[i][j] += dp[i - 1][j - num[i]];
... | a.cc: In function 'int main()':
a.cc:10:9: error: 'n' was not declared in this scope
10 | cin >> n;
| ^
a.cc:11:37: error: 'num' was not declared in this scope; did you mean 'enum'?
11 | for(int i = 0;i < n - 1;i++)cin >> num[i];
| ^~~
| ... |
s559376163 | p00480 | C++ | #include<iostream>#include<string>using namespace std;long long dp[100][21];int N, num[100];long long dfs(int i, int v){ if(dp[i][v] != -1) return dp[i][v]; if(i == N - 1) return v == num[N - 1] ? 1 : 0; int plus = v num[i]; int minus = v - num[i]; long long n = 0; if(plus >= 0 | a.cc:1:19: warning: extra tokens at end of #include directive
1 | #include<iostream>#include<string>using namespace std;long long dp[100][21];int N, num[100];long long dfs(int i, int v){ if(dp[i][v] != -1) return dp[i][v]; if(i == N - 1) return v == num[N - 1] ? 1 : 0; int plus = v num[i]; int minus = v... |
s009843407 | p00480 | C++ |
#include<iostream>
#include<string>
using namespace std;
long long dp[100][21];
int N, num[100];
long long dfs(int i, int v)
{
if(dp[i][v] != -1)
return dp[i][v];
if(i == N - 1)
return v == num[N - 1] ? 1 : 0;
int plus = v num[i];
int minus = v - num[i];
long long n = 0;
if(plus >= 0 | a.cc: In function 'long long int dfs(int, int)':
a.cc:15:18: error: expected ',' or ';' before 'num'
15 | int plus = v num[i];
| ^~~
a.cc:18:15: error: expected ')' at end of input
18 | if(plus >= 0
| ~ ^
| )
a.cc:18:15: error: expected statement ... |
s473969440 | p00480 | C++ |
#include<iostream>
#include<string>
using namespace std;
long long dp[100][21];
int N, num[100];
long long dfs(int i, int v)
{
if(dp[i][v] != -1)
return dp[i][v];
if(i == N - 1)
return v == num[N - 1] ? 1 : 0;
int plus = v num[i];
int minus = v - num[i];
long long n = 0;
if(plus >= 0 | a.cc: In function 'long long int dfs(int, int)':
a.cc:15:18: error: expected ',' or ';' before 'num'
15 | int plus = v num[i];
| ^~~
a.cc:18:15: error: expected ')' at end of input
18 | if(plus >= 0
| ~ ^
| )
a.cc:18:15: error: expected statement ... |
s625119909 | p00480 | C++ |
#include<iostream>
#include<string>
using namespace std;
long long dp[100][21];
int N, num[100];
long long dfs(int i, int v)
{
if(dp[i][v] != -1)
return dp[i][v];
if(i == N - 1)
return v == num[N - 1] ? 1 : 0;
int plus = v num[i];
int minus = v - num[i];
long long n = 0;
if(plus >= 0 | a.cc: In function 'long long int dfs(int, int)':
a.cc:15:18: error: expected ',' or ';' before 'num'
15 | int plus = v num[i];
| ^~~
a.cc:18:15: error: expected ')' at end of input
18 | if(plus >= 0
| ~ ^
| )
a.cc:18:15: error: expected statement ... |
s999800464 | p00480 | C++ |
#include<iostream>
#include<string>
using namespace std;
long long dp[100][21];
int N, num[100];
long long dfs(int i, int v)
{
if(dp[i][v] != -1)
return dp[i][v];
if(i == N - 1)
return v == num[N - 1] ? 1 : 0;
int plus = v num[i];
int minus = v - num[i];
long long n = 0;
if(plus >= 0 \ | a.cc:18:16: error: stray '\' in program
18 | if(plus >= 0 \
| ^
a.cc: In function 'long long int dfs(int, int)':
a.cc:15:18: error: expected ',' or ';' before 'num'
15 | int plus = v num[i];
| ^~~
a.cc:18:15: error: expected ')' at end of input
18 | if(plus >... |
s911343702 | p00480 | C++ |
#include<iostream>
#include<string>
using namespace std;
long long dp[100][21];
int N, num[100];
long long dfs(int i, int v)
{
if(dp[i][v] != -1)
return dp[i][v];
if(i == N - 1)
return v == num[N - 1] ? 1 : 0;
int plus = v num[i];
int minus = v - num[i];
long long n = 0;
if(plus >= 0 && plus <=... | a.cc: In function 'long long int dfs(int, int)':
a.cc:15:18: error: expected ',' or ';' before 'num'
15 | int plus = v num[i];
| ^~~
a.cc:19:15: error: expected ')' before numeric constant
19 | n = dfs(i 1, plus);
| ~ ^ ~
| )
a.cc:21:15: err... |
s750706769 | p00480 | C++ |
=23include=3Ciostream=3E
=23include=3Cstring=3E
using=20namespace=20std=3B
long=20long=20dp=5B100=5D=5B21=5D=3B
int=20N=2C=20num=5B100=5D=3B
long=20long=20dfs=28int=20i=2C=20int=20v=29
=7B
=20=20if=28dp=5Bi=5D=5Bv=5D=20=21=3D=20=2D1=29
=20=20=20=20return=20dp=5Bi=5D=5Bv=5D=3B
=20=20if=28i=20=3D=3D=20N=20=2D=201=29
=... | a.cc:2:23: error: exponent has no digits
2 | =23include=3Ciostream=3E
| ^~
a.cc:3:21: error: exponent has no digits
3 | =23include=3Cstring=3E
| ^~
a.cc:19:20: error: exponent has no digits
19 | =20=20if=28plus=20=3E=3D=200=20=26=26=20plus=20=3C=3D=2020=2... |
s243325671 | p00480 | C++ | null | a.cc:1:1: error: 'null' does not name a type
1 | null
| ^~~~
|
s091281727 | p00480 | C++ | null | a.cc:1:1: error: 'null' does not name a type
1 | null
| ^~~~
|
s622542843 | p00480 | C++ | null | a.cc:1:1: error: 'null' does not name a type
1 | null
| ^~~~
|
s414060571 | p00480 | C++ |
#include<iostream>
#include<string>
using namespace std;
long long dp[100][21];
int N, num[100];
long long dfs(int i, int v)
{
if(dp[i][v] != -1)
return dp[i][v];
if(i == N - 1)
return v == num[N - 1] ? 1 : 0;
int plus = v \ num[i];
int minus = v - num[i];
long long n = 0;
if(plus >= 0 \ | a.cc:15:16: error: stray '\' in program
15 | int plus = v \ num[i];
| ^
a.cc:18:16: error: stray '\' in program
18 | if(plus >= 0 \
| ^
a.cc: In function 'long long int dfs(int, int)':
a.cc:15:19: error: expected ',' or ';' before 'num'
15 | int plus = v \ num[... |
s222823077 | p00480 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんどくさ... | a.cc:72:14: error: redefinition of 'std::stack<short int> x'
72 | stack<short> x, y;
| ^
a.cc:25:14: note: 'std::stack<short int> x' previously declared here
25 | stack<short> x, y;
| ^
a.cc:72:17: error: redefinition of 'std::stack<short int> y'
72 | stack<short> x, y;
... |
s600531304 | p00480 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんどくさ... | a.cc:72:14: error: redefinition of 'std::stack<short int> x'
72 | stack<short> x, y;
| ^
a.cc:25:14: note: 'std::stack<short int> x' previously declared here
25 | stack<short> x, y;
| ^
a.cc:72:17: error: redefinition of 'std::stack<short int> y'
72 | stack<short> x, y;
... |
s105930519 | p00480 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんどくさ... | a.cc:72:14: error: redefinition of 'std::stack<short int> x'
72 | stack<short> x, y;
| ^
a.cc:25:14: note: 'std::stack<short int> x' previously declared here
25 | stack<short> x, y;
| ^
a.cc:72:17: error: redefinition of 'std::stack<short int> y'
72 | stack<short> x, y;
... |
s285264520 | p00480 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんどくさ... | a.cc:72:14: error: redefinition of 'std::stack<short int> x'
72 | stack<short> x, y;
| ^
a.cc:25:14: note: 'std::stack<short int> x' previously declared here
25 | stack<short> x, y;
| ^
a.cc:72:17: error: redefinition of 'std::stack<short int> y'
72 | stack<short> x, y;
... |
s000773309 | p00480 | C++ | //まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <iostream>
//using namespace stdしないと表記がめんどくさ... | a.cc:72:14: error: redefinition of 'std::stack<short int> x'
72 | stack<short> x, y;
| ^
a.cc:25:14: note: 'std::stack<short int> x' previously declared here
25 | stack<short> x, y;
| ^
a.cc:72:17: error: redefinition of 'std::stack<short int> y'
72 | stack<short> x, y;
... |
s503270681 | p00480 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
int n,d[101];
ll dp[101][21];
int main(){
cin >> n;
for(int i = 0;i < n;i++) cin >> d[i];
memset(dp,0,sizeof(dp)); dp[0][d[0]] = 1;
for(int i = 0;i < n - 1;i++){
for(int j = 0;j <= 20;j++){
if(j + d[i] <= 20) dp[i... | a.cc: In function 'int main()':
a.cc:13:3: error: 'memset' was not declared in this scope
13 | memset(dp,0,sizeof(dp)); dp[0][d[0]] = 1;
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <algorithm>
+++ |+#include ... |
s493598924 | p00480 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef vector<int> vi;
typedef unsigned long long ull;
#define rep(i,a) for(int i=0; i<int(a); i++)
int n;
int a[100];
int s;
ull dp[2][25];
ull solve(){
memset(dp, 0, sizeof(dp));
ull *cur = dp[0], *prev = dp[1];
prev[0] = 1;
rep(i, n){
... | a.cc: In function 'ull solve()':
a.cc:16:5: error: 'memset' was not declared in this scope
16 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector>
+++ |+#include <cstring>
... |
s803098877 | p00480 | C++ | #include<iostream>
int num[101];
int n;
long long memo[21][101];
long long calc(int sum, int cnt){
long long res = 0;
if (sum < 0 || sum > 20)return 0;
if (cnt == n - 1){
if (sum == num[n - 1])return memo[sum][cnt] = 1;
return 0;
}
if (memo[sum][cnt])return memo[sum][cnt];
res += calc(sum + num[cnt], cn... | a.cc: In function 'int main()':
a.cc:30:9: error: 'memset' was not declared in this scope
30 | memset(memo, 0, sizeof(memo));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <... |
s020814014 | p00480 | C++ | #include <iostream>
#include <array>
#include <fstream>
int main(){
const int max_sum = 20;
const int min_sum = 0;
const int max_number = 100;
int N;
//std::ifstream ifs("517.txt");
//while(std::cin >> N){
std::cin >> N;
std::array<int, max_number> numbers;
std::array<s... | a.cc: In function 'int main()':
a.cc:20:13: error: 'syd' has not been declared
20 | syd::cin /*ifs*/ >> numbers[i];
| ^~~
|
s011581860 | p00480 | C++ | #include <iostream>
#include <array>
#include <fstream>
int main(){
const int max_sum = 20;
const int min_sum = 0;
const int max_number = 100;
int N;
//std::ifstream ifs("517.txt");
//while(std::cin >> N){
std::cin >> N;
std::array<int, max_number> numbers;
std::array<s... | a.cc: In function 'int main()':
a.cc:20:13: error: 'syd' has not been declared
20 | syd::cin /*ifs*/ >> numbers[i];
| ^~~
|
s729606141 | p00480 | C++ | #include <iostream>
#include <vector>
int main(){
int num;
std::vector< std::vector<int> > dp(num, std::vector<int>(21,0));
std::cin >> num;
std::vector<int> value(num);
for(int i = 0; i < n; ++i){
std::cin >> value[i];
}
dp[0][0] = 1;
for(int i = 0; i < (value.size() - 1); ++i){
for(int j = 0; j <= 20; ++... | a.cc: In function 'int main()':
a.cc:9:28: error: 'n' was not declared in this scope
9 | for(int i = 0; i < n; ++i){
| ^
|
s422874901 | p00480 | C++ | nclude <iostream>
#include <vector>
int main(){
const int MAX = 20;
const int MIN = 0;
int num;
std::cin >> num;
std::vector< std::vector<long int> > dp((num - 1), std::vector<long int>((MAX + 1), 0));
int value;
std::cin >> value;
dp[0][value] = 1;
for(int i = 0; i < (num - 2); ++i){
std::cin >> value;
... | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude <iostream>
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cx... |
s978729607 | p00481 | Java | import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Scanner;
/**
* Created by sotetsuk on 2015/07/14.
*/
public class AOJ0558 implements {
public static final int MAX_H = 1005;
public static final int MAX_W = 1005;
public static final int MAX_N = 15;
public static int H, W, N;
... | Main.java:8: error: illegal start of type
public class AOJ0558 implements {
^
1 error
|
s031461031 | p00481 | Java | import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Scanner;
/**
* Created by sotetsuk on 2015/07/14.
*/
public class Main implements {
public static final int MAX_H = 1005;
public static final int MAX_W = 1005;
public static final int MAX_N = 15;
public static int H, W, N;
pub... | Main.java:8: error: illegal start of type
public class Main implements {
^
1 error
|
s755484528 | p00481 | Java | import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Scanner;
/**
* Created by sotetsuk on 2015/07/14.
*/
public class AOJ0558 {
public static final int MAX_H = 1005;
public static final int MAX_W = 1005;
public static final int MAX_N = 15;
public static int H, W, N;
public stat... | Main.java:8: error: class AOJ0558 is public, should be declared in a file named AOJ0558.java
public class AOJ0558 {
^
1 error
|
s519736340 | p00481 | Java |
import java.util.*;
public class A {
public static class Point {
public int x;
public int y;
public int pre;
public Point(){
}
public Point(int x1,int y1) {
x = x1;
y = y1;
}
public Point(int x1,int y1 ,int pre1) {
x = x1;
y = y1;
pre= pre1;
}
public void setX(int x1){
x =x... | Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s890505569 | p00481 | Java | package cad.week2.a2;
import java.awt.Point;
import java.util.LinkedList;
import java.util.Scanner;
import cad.week2.a.Main.P;
public class Main{
public static class P{
int x;
int y;
public P(){
}
public P(int x, int y) {
super();
this.x = x;
this.y = y;
}
}
static P s = new P();
stat... | Main.java:7: error: package cad.week2.a.Main does not exist
import cad.week2.a.Main.P;
^
1 error
|
s576067553 | p00481 | Java | import com.sun.xml.internal.xsom.impl.scd.Iterators;
import java.util.*;
public class Main {
private static class Point {
int x;
int y;
Point(int x, int y) {
this.x = x;
this.y = y;
}
public boolean equals(Point p) {
return p.x == x &&... | Main.java:1: error: package com.sun.xml.internal.xsom.impl.scd does not exist
import com.sun.xml.internal.xsom.impl.scd.Iterators;
^
1 error
|
s429221619 | p00481 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.List;
import ... | Main.java:14: error: class q0558 is public, should be declared in a file named q0558.java
public class q0558 {
^
1 error
|
s216274432 | p00481 | Java | package nofill_nosubmit;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
public class AOJ_0558
{
public static void main(String[] args)
{
Scanner in=new Scanner(System.in);
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
while(in.hasNext())
{
int H=in.nextInt(),W=in.nextInt();... | Main.java:5: error: class AOJ_0558 is public, should be declared in a file named AOJ_0558.java
public class AOJ_0558
^
1 error
|
s339161376 | p00481 | C | #include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
char a[1001][1001];
int v[1001][1001],n,h,w,sx,sy,ans,s;
int dir[4][2]={-1,0,1,0,0,1,0,-1};
char b[1001];
int check(int x,int y)
{
if(x>=0&&x<h&&y>=0&&y<w)
return 1;
return 0;
}
void dfs(int x,int y,char c,int cnt)
{
int t... | main.c:3:9: fatal error: algorithm: No such file or directory
3 | #include<algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s866465748 | p00481 | C | #include<stdio.h>
#include<string.h>
#include<algorithm>
#include<queue>
using namespace std;
char a[1001][1001];
int v[1001][1001],n,h,w,sx,sy,ans;
int dir[4][2]={-1,0,1,0,0,1,0,-1};
char b[1001];
int s[101][101];
struct st
{
int x,y;
}st1,st2,fl;
queue<st>qq;
int check(st kk)
{
int x=kk.x;
int y=kk.y;
... | main.c:3:9: fatal error: algorithm: No such file or directory
3 | #include<algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s202670367 | p00481 | C | #include <cstdio>
#include <map>
#include <queue>
#include <string>
using namespace std;
const int INF = 100000000;
const int MAX_H = 1000;
const int MAX_W = 1000;
const int MAX_N = 9;
int H, W, N;
char field[MAX_H][MAX_W];
int d[MAX_H][MAX_W]; // ?????????????????\??´?????§??????????????°, 1~N??§?????????????????§?... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s925966769 | p00481 | C | #include<cstdio>
#include<cstring>
#include<queue>
using namespace std;
struct node
{
int x, y, step;
};
int a, b, ans, n;
int book[1010][1010];
char on[1010][1010];
void bfs(int x, int y, int k)
{
memset(book, 0, sizeof(book));
int dir[4][2] = {{0,1},{0,-1},{1,0},{-1,0}};
node s, e;
int f = 0;
... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s936653399 | p00481 | C | #include<iostream>
#include<algorithm>
#include<map>
using namespace std;
#define MAX 1001
int h, w, n;
char city[MAX][MAX];
int step[10];
int direc1[4] = { -1,0,1,0 }, direc2[4] = { 0,1,0,-1 };
void dfs(char (&nowcity)[MAX][MAX], int nowstep, bool find, int nowi, int nowj, int nowpower, map<int, int> visited) {
if ... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s140840042 | p00481 | C | #include<stdio.h>
#include<stdlib.h>
struct TQueue{
int x,y;
struct TQueue* next;
};
void allfree(struct TQueue* q){
struct TQueue* r[2];
r[0]=q;
if(q==0)return;
r[1]=q->next;
while(r[1]){
free(r[0]);
r[0]=r[1];
r[1]=r[1]->next;
}
free(r[0]);
}
struct TQueue* push(struct TQueue* ed,int ... | main.c: In function 'push':
main.c:28:11: error: 'struct TQueue' has no member named 'dep'
28 | ed->next->dep=d;
| ^~
main.c: In function 'main':
main.c:66:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
66 | gets(s);
| ^~~~
... |
s280768074 | p00481 | C | #include<stdio.h>
#include<stdlib.h>
struct TQueue{
int x,y,d;
struct TQueue* next;
};
void allfree(struct TQueue* q){
struct TQueue* r[2];
r[0]=q;
if(q==0)return;
r[1]=q->next;
while(r[1]){
free(r[0]);
r[0]=r[1];
r[1]=r[1]->next;
}
free(r[0]);
}
struct TQueue* push(struct TQueue* ed,in... | main.c: In function 'push':
main.c:28:11: error: 'struct TQueue' has no member named 'dep'
28 | ed->next->dep=d;
| ^~
main.c: In function 'main':
main.c:66:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
66 | gets(s);
| ^~~~
... |
s551519350 | p00481 | C | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
#define MAXN 1005
using namespace std;
struct node {
int i;
int j;
char val;
};
int H, W, N;//H(1 <= H <= 1000)、W(1 <= W <=1000)、N(1 <= N <= 9)
char m[MAXN][MAXN];
queue<node> q;
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s890992739 | p00481 | C |
import java.util.*;
public class Main {
public static class Point {
public int x;
public int y;
public int pre;
public Point(){
}
public Point(int x1,int y1) {
x = x1;
y = y1;
}
public Point(int x1,int y1 ,int pre1) {
x = x1;
y = y1;
pre= pre1;
}
public void setX(int x1){
x... | main.c:2:1: error: unknown type name 'import'
2 | import java.util.*;
| ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
2 | import java.util.*;
| ^
main.c:4:1: error: unknown type name 'public'
4 | public class Main {
| ^~~~~~
main.c:... |
s351686522 | p00481 | C | #include<stdio.h>
#include<iostream>
#include<queue>
#include<string.h>
using namespace std;
struct PP{
int x;
int y;
int Z;
int c;
};
char s[1000][1000],C[11]={"0123456789"};
int D[1000][1000];
int A[1000][1000],d;
int main(){
PP S;
queue<PP> P;
int w,h;
int d=0,i=0,j=0,l=-1;
int x[4]={ 1, 0,-1,0};
int y[4]... | main.c:2:9: fatal error: iostream: No such file or directory
2 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s454213105 | p00481 | C | #include <iostream>
#include <cstdio>
#include <queue>
#include <cstring>
using namespace std;
int H,W,N;
typedef pair<int,int> P;
#define INF 1e-9
const int MAX_N=1001;
char maze[MAX_N][MAX_N];
bool vis[MAX_N][MAX_N];
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int d[MAX_N][MAX_N];
bool right(int x,int y)
{
if(x>=... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s525971078 | p00481 | C | /* AOJ0558 Cheese */
#include<bits/stdc++.h>
using namespace std;
const int DIRECTSIZE = 4;
struct _direct {
int drow;
int dcol;
} direct[DIRECTSIZE] = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}};
const int N = 1000;
const int N2 = 10;
char grid[N][N], visited[N][N];
int h, w, n;
struct _factory {
int row;
int co... | main.c:2:9: fatal error: bits/stdc++.h: No such file or directory
2 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s416509457 | p00481 | C | //AOJ-0558
#include <cstdio>
#include <cstring>
#include <queue>
using namespace std;
char map[1010][1010];
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int vis[1010][1010];
int m, n, N;
struct node{
int x, y, t;
};
node bfs(int x, int y, int k)
{
memset(vis, 0, sizeof(vis));
queue<node> q;
vis[x][y] = 1... | main.c:2:10: fatal error: cstdio: No such file or directory
2 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s746420675 | p00481 | C | #include<stdio.h>
#include<string.h>
#include<queue>
using namespace std;
const int maxn=1005;
int n,m,k,dx[]={-1,1,0,0},dy[]={0,0,1,-1},vis[maxn][maxn];
char map[maxn][maxn];
struct maze
{
int x,y,time;
};
maze bfs(int bx,int by,char ch)
{
memset(vis,0,sizeof(vis));
queue<maze> ... | main.c:3:9: fatal error: queue: No such file or directory
3 | #include<queue>
| ^~~~~~~
compilation terminated.
|
s999288778 | p00481 | C | #include <iostream>
#include <cstring>
#include <queue>
#include <algorithm>
#include <cstdio>
#define INF 1 << 29
using namespace std;
int dx[4] = {1,0,-1,0};
int dy[4] = {0,-1,0,1};
char f[1003][1003];
int visited[1003][1003][10];
class S{
public:
int x;
int y;
int lvl;
int step;
S(int x, int... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s128501309 | p00481 | C | #include <iostream>
#include <cstring>
#include <queue>
#include <algorithm>
#include <cstdio>
#define INF 1 << 29
using namespace std;
int dx[4] = {1,0,-1,0};
int dy[4] = {0,-1,0,1};
char f[1003][1003];
bool visited[1003][1003][10];
class S{
public:
int x;
int y;
int lvl;
int step;
S(int x, in... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s178430958 | p00481 | C | #include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
typedef struct {
short cost, x, y;
}Point;//螳壻ケ我ク?クェ扈捺桷菴鍋畑譚・蟄伜お豈丈クェ蟾・蜴ら噪蝮先?菴咲スョ蜥悟・カ驟ェ逧??
int H, W, N;
vector<Point> factory;
char map[1000][1002];
short dx[4] = {-1, 1, 0, 0}, dy[4] = {0, 0, -1, 1};
bool myfunction(Point a, ... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s770263445 | p00481 | C | #include <stdio.h>
#include <queue>
using namespace std;
const int INF = 100000;
char maze[1005][1005];
int d[1005][1005];
int w, h;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
struct Coor {
int x, y;
Coor(int x, int y) : x(x), y(y) {}
};
queue<Coor> Q;
int bfs(int sx, int sy, int gx, int gy)
{
int i... | main.c:2:10: fatal error: queue: No such file or directory
2 | #include <queue>
| ^~~~~~~
compilation terminated.
|
s260814148 | p00481 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int, int> P;
const int MAX_H = 1000;
const int MAX_W = 1000;
const int MAX_N = 9;
const int INF = INT32_MAX;
char maze[MAX_H][MAX_W + 1];
int H, W, N;
int si, sj;
int gi[MAX_N + 1], gj[MAX_N + 1];
int d[MAX_H][MAX_W];
int dx... | a.cc:12:17: error: 'INT32_MAX' was not declared in this scope
12 | const int INF = INT32_MAX;
| ^~~~~~~~~
a.cc:4:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
3 | #include <queue>
+++ |+#include <cstdint>
4 |
|
s888144305 | p00481 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<queue>
#include<string>
#include<cstdio>
#include<stack>
#include<cmath>
#include<bitset>
#include<memory>
#include<utility>
#include<map>
using namespace std;
#define FOR(i,m,n) for(i=m;i<n;i++)
#define CLR(a,b) memset(a,b,sizeof(a))
#defin... | a.cc: In function 'int main()':
a.cc:16:18: error: 'memset' was not declared in this scope
16 | #define CLR(a,b) memset(a,b,sizeof(a))
| ^~~~~~
a.cc:78:17: note: in expansion of macro 'CLR'
78 | CLR(vis, 0);
| ^~~
a.cc:14:1: note: 'memset' is defined in... |
s556055106 | p00481 | C++ | #include <cstdio>
#include <utility>
#include <queue>
#include <cstdlib>
using namespace std;
int H, W, N;
char field[1001][1001];
int d[1000][1000];
pair<int, int> start;
pair<int, int> cheese;
int INF = 1000000;
int result = 0;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
void bfs()
{
for (int n = 1; ... | a.cc:76:2: error: expected unqualified-id before '=' token
76 | }= 0; i < 4; i++)
| ^
a.cc:76:7: error: 'i' does not name a type
76 | }= 0; i < 4; i++)
| ^
a.cc:76:14: error: 'i' does not name a type
76 | }= 0; i < 4; i++)
| ^
a.cc:87:9: error: expected declaration before ... |
s273391503 | p00481 | C++ | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define VDEL(v, n) v.erase(v.begin() + (n))
#define ALL(v) v.begin(), v.end()
#define INTMAX 2147483647
#define INF 200000000... | a.cc:29:9: error: 'long long int y0' redeclared as different kind of entity
29 | int x0, y0;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config... |
s052950174 | p00481 | C++ | #include <iostream>
#include <utility>
#include <queue>
using namespace std;
typedef pair<int, int> Pair;
const int INF = 100000000;
int H, W;
char N;
const int MAX_H = 1000, MAX_W = 1000;
char plant[MAX_H][MAX_W];
int sx, sy;
int dx[4] = {0,1,0,-1}, dy[4] = {1,0,-1,0};
int d[MAX_H][MAX_W];
int time;
void bfs() {
... | a.cc:16:5: error: 'int time' redeclared as different kind of entity
16 | int time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s411349562 | p00481 | C++ | #include <iostream>
#include <utility>
#include <queue>
using namespace std;
typedef pair<int, int> Pair;
const int INF = 100000000;
int H, W;
char N;
const int MAX_H = 1000, MAX_W = 1000;
char plant[MAX_H][MAX_W];
int sx, sy;
int dx[4] = {0,1,0,-1}, dy[4] = {1,0,-1,0};
int d[MAX_H][MAX_W];
int time;
void bfs() {
... | a.cc:16:5: error: 'int time' redeclared as different kind of entity
16 | int time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s993281487 | p00481 | C++ | #include <iostream>
#include <utility>
#include <queue>
using namespace std;
typedef pair<int, int> Pair;
const int INF = 100000000;
int H, W;
char N;
const int MAX_H = 1000, MAX_W = 1000;
char plant[MAX_H][MAX_W];
int sx, sy;
int dx[4] = {0,1,0,-1}, dy[4] = {1,0,-1,0};
int d[MAX_H][MAX_W];
int time;
void bfs() {
... | a.cc:16:5: error: 'int time' redeclared as different kind of entity
16 | int time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s137392589 | p00481 | C++ | #include <iostream>
#include <utility>
#include <queue>
using namespace std;
typedef pair<int, int> Pair;
const int INF = 100000000;
int H, W;
char N;
const int MAX_H = 1000, MAX_W = 1000;
char plant[MAX_H][MAX_W];
int sx, sy;
int dx[4] = {0,1,0,-1}, dy[4] = {1,0,-1,0};
int d[MAX_H][MAX_W];
int time;
void bfs() {
... | a.cc:16:5: error: 'int time' redeclared as different kind of entity
16 | int time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s108000418 | p00481 | C++ | #include <iostream>
#include <cstdio>
#include <utility>
#include <queue>
using namespace std;
typedef pair<int, int> Pair;
const int INF = 100000000;
int H, W, N;
const int MAX_H = 1000, MAX_W = 1000;
char plant[MAX_H][MAX_W];
int sx, sy;
int dx[4] = {0,1,0,-1}, dy[4] = {1,0,-1,0};
int d[MAX_H][MAX_W];
int time;
vo... | a.cc:16:5: error: 'int time' redeclared as different kind of entity
16 | int time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s677403806 | p00481 | C++ |
#include <iostream>
#include <algorithm>
#include <stdlib.h>
#include <queue>
using namespace std;
int h,w,n;
char map[1010][1010]={0};
bool flag[1010][1010]={false};
int arr[11][2]={0};
int dir[4][2] = { {1, 0}, {-1, 0}, {0, 1}, {0, -1} };
class node
{
public:
node(int x,int y,int s);
int x;
int y;
int s;
};
n... | a.cc: In function 'int main()':
a.cc:79:17: error: 'memset' was not declared in this scope
79 | memset(flag,false,sizeof(flag));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <queue>
... |
s573253883 | p00481 | C++ | #include <iostream>
#include <queue>
using namespace std;
#define MAXN 1001
char A[MAXN][MAXN];
int w,h,n;
int s[2];
void input()
{
cin>>h>>w>>n;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>A[i][j];
if(A[i][j]=='S'){
s[0]=i;
s[1]=j;
... | a.cc: In function 'int main()':
a.cc:63:9: error: 'memset' was not declared in this scope
63 | memset(known, 0, sizeof(int)*MAXN*MAXN);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <queue>
+++ |+#i... |
s081476553 | p00481 | C++ | #include <iostream>
#include <queue>
using namespace std;
#define MAXN 1001
char A[MAXN][MAXN];
int w,h,n;
int s[2];
void input()
{
cin>>h>>w>>n;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>A[i][j];
if(A[i][j]=='S'){
s[0]=i;
s[1]=j;
... | a.cc: In function 'int main()':
a.cc:63:9: error: 'memset' was not declared in this scope
63 | memset(known, 0, sizeof(int)*MAXN*MAXN);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <queue>
+++ |+#i... |
s824426701 | p00481 | C++ | #include <iostream>
#include <queue>
#include <string>
using namespace std;
#define MAXN 1001
char A[MAXN][MAXN];
int w,h,n;
int s[2];
void input()
{
cin>>h>>w>>n;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>A[i][j];
if(A[i][j]=='S'){
s[0]=i;
... | a.cc: In function 'int main()':
a.cc:64:9: error: 'memset' was not declared in this scope
64 | memset(known, 0, sizeof(int)*MAXN*MAXN);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <queue>
+++ |+#i... |
s986880079 | p00481 | C++ | //幅優先探索
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<set>
#include<map>
#include<memory>
#define FOR(i,R) for(int i=0;i<R;i++)
#define ZERO(a) memset(a,0,sizeof(a))
using namespace std;
typedef pair<int,int> P;
const int INF=10000;
//init()
char maze[1... | a.cc:47:1: error: '::main' must return 'int'
47 | void main(){
| ^~~~
|
s726854173 | p00481 | C++ | #include<iostream>
#include<queue>
const int MAXW = 1 | a.cc:4:19: error: expected ',' or ';' at end of input
4 | const int MAXW = 1
| ^
|
s820193008 | p00481 | C++ | #include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <array>
#include <stack>
#include <queue>
#include <chrono>
#include <numeric>
#pragma warning(disable:4996)
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
typedef long long Int;
using namespa... | a.cc: In function 'int main()':
a.cc:76:33: error: expected ';' before '}' token
76 | que.front().step
| ^
| ;
77 | }
| ~
a.cc: In function 'point solve(char)':
a.cc:55:1: warn... |
s998469083 | p00481 | C++ | #include<iostream>
#include<queue>
#define fi first
#define se second
using namespace std;
int dy[4]={0,0,-1,1},dx[4]={1,-1,0,0};
int X,Y,N;
typedef pair<int,int>P;
char field[1000][1001];
P time[1000][1001];//first->time,second->cheese
typedef struct point{
int y,x,t,n;
}point;
int bfs(int,int);
int main(){
ci... | a.cc:10:18: error: 'P time [1000][1001]' redeclared as different kind of entity
10 | P time[1000][1001];//first->time,second->cheese
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /us... |
s447454251 | p00481 | C++ | #include<iostream>
#include<queue>
#define fi first
#define se second
using namespace std;
int dy[4]={0,0,-1,1},dx[4]={1,-1,0,0};
int X,Y,N;
typedef pair<int,int>P;
char field[1000][1001];
P time[1000][1001];
typedef struct point{
int y,x,t,n;
}point;
int bfs(int,int);
int main(){
cin>>Y>>X>>N;
int rep=0;
... | a.cc:10:18: error: 'P time [1000][1001]' redeclared as different kind of entity
10 | P time[1000][1001];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c... |
s678745629 | p00481 | C++ | #include<iostream>
#include<queue>
#define fi first
#define se second
using namespace std;
int dy[4]={0,0,-1,1},dx[4]={1,-1,0,0};
int X,Y,N;
typedef pair<int,int> P;
char field[1000][1001];
P time[1000][1001];
typedef struct point{
int y,x,t,n;
}point;
int bfs(int,int);
int main(){
cin>>Y>>X>>N;
int rep;
... | a.cc:10:18: error: 'P time [1000][1001]' redeclared as different kind of entity
10 | P time[1000][1001];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c... |
s214702209 | p00481 | C++ | #include<iostream>
#include<queue>
#define fi first
#define se second
using namespace std;
int dy[4]={0,0,-1,1},dx[4]={1,-1,0,0};
int X,Y,N;
typedef pair<int,int> P;
char field[1000][1001];
P time[1000][1001];
struct point{
int y,x,t,n;
};
int bfs(int,int);
int main(){
cin>>Y>>X>>N;
int rep;
for(int i=0... | a.cc:10:18: error: 'P time [1000][1001]' redeclared as different kind of entity
10 | P time[1000][1001];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c... |
s326696710 | p00481 | C++ | #include<iostream>
#include<queue>
#define fi first
#define se second
using namespace std;
int dy[4]={0,0,-1,1},dx[4]={1,-1,0,0};
int X,Y,N;
typedef pair<int,int> P;
char field[1000][1001];
P time[1000][1001];
struct point{
int y,x,t,n;
point(int y_,int x_,int t_,int n_){
y=y_;x=x_;t=t_;n=n_;
}
};
i... | a.cc:10:18: error: 'P time [1000][1001]' redeclared as different kind of entity
10 | P time[1000][1001];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c... |
s780471790 | p00481 | C++ | #include<iostream>
#include<queue>
#define fi first
#define se second
using namespace std;
int dy[4]={0,0,-1,1},dx[4]={1,-1,0,0};
int X,Y,N;
char field[1000][1001];
pair<int,int> time[1000][1001];
struct point{
int y,x,t,n;
point(int y_,int x_,int t_,int n_){
y=y_;x=x_;t=t_;n=n_;
}
};
int bfs(int,in... | a.cc:9:30: error: 'std::pair<int, int> time [1000][1001]' redeclared as different kind of entity
9 | pair<int,int> time[1000][1001];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
... |
s879374229 | p00481 | C++ | #include<iostream>
#include<queue>
#define fi first
#define se second
using namespace std;
int dy[4]={0,0,-1,1},dx[4]={1,-1,0,0};
int X,Y,N;
char field[1000][1001];
pair<int,int> time[1000][1001];
struct point{
int y,x,t,n;
point(int y_,int x_,int t_,int n_){
y=y_;x=x_;t=t_;n=n_;
}
};
int bfs(int y,... | a.cc:9:30: error: 'std::pair<int, int> time [1000][1001]' redeclared as different kind of entity
9 | pair<int,int> time[1000][1001];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
... |
s614085446 | p00481 | C++ | #include <stdio.h>
int main() {
int i, j;
int h, w, n;
scanf("%d %d %d", &h, &w, &n);
for (i=0; i<h; i++) {
for (j=0; j<w; j++) {
int c;
scanf(" %c", &c);
if (c == 'S')
| a.cc: In function 'int main()':
a.cc:13:26: error: expected statement at end of input
13 | if (c == 'S')
| ^
a.cc:13:26: error: expected '}' at end of input
a.cc:9:29: note: to match this '{'
9 | for (j=0; j<w; j++) {
| ^
a.cc:1... |
s307349206 | p00481 | C++ | #include <stdio.h>
int main() {
int i, j;
int h, w, n;
scanf("%d %d %d", &h, &w, &n);
for (i=0; i<h; i++) {
for (j=0; j<w; j++) {
int c;
scanf(" %c", &c);
if (c == 'S')
| a.cc: In function 'int main()':
a.cc:13:26: error: expected statement at end of input
13 | if (c == 'S')
| ^
a.cc:13:26: error: expected '}' at end of input
a.cc:9:29: note: to match this '{'
9 | for (j=0; j<w; j++) {
| ^
a.cc:1... |
s917931066 | p00481 | C++ | #include<iostream>
#include<queue>
using namespace std;
int flg[1000][1000];
void ini(){
for(int i=0;i<1000;i++){
for(int j=0;j<1000;j++){
flg[i][j]=-1;
}
}
}
int main(){
int x,y,n;
int map[1001][1001];
int cnt=0;
pair<int,int> p;
ntoa[10]="123456789";
cin>>y>>x>>n;
for(int i=0i<y;i++){
for(int j=... | a.cc: In function 'int main()':
a.cc:19:9: error: 'ntoa' was not declared in this scope
19 | ntoa[10]="123456789";
| ^~~~
a.cc:22:21: error: invalid operands of types '__complex__ int' and 'int' to binary 'operator<'
22 | for(int i=0i<y;i++){
a.cc:22:27: error: expected ';' before ')... |
s737716778 | p00481 | C++ | #include<iostream>
#include<map>
#include<queue>
using namespace std;
typedef pair<int,int> P;
queue<P> q;
int sx,sy;
int gx,gy;
int g;
char field[1000][1000];
int d[1000][1000];
int H,W,N;
int hp=1;
int ans=0;
int bfs(){
memset(d,-1,sizeof(d));
P p;
q.push(P(sx,sy));
d[sx][sy]=0;
while(q.size()){
if(q.front(... | a.cc: In function 'int bfs()':
a.cc:19:9: error: 'memset' was not declared in this scope
19 | memset(d,-1,sizeof(d));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<queue>
+++ |+#include <cstring>
... |
s751741965 | p00481 | C++ | #include<iostream>
#include<queue>
using namespace std;
struct ma
{
int x;
int y;
};
int dx[4] = { 0, 1, 0, -1 }, dy[4] = { 1, 0, -1, 0 };
int main()
{
int ans = 0;
int tate, yoko;
int n;
cin >> tate >> yoko >> n;
char m[1100][1100];
ma sta;
for (int i = 0; i < tate; i++)
{
for (int k = 0; k < yoko; k++)
... | a.cc: In function 'int main()':
a.cc:36:17: error: 'memset' was not declared in this scope
36 | memset(map, -1, sizeof(map));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<queue>
+++... |
s649089365 | p00481 | C++ | #include<bits/stdc++.h>
using namespace std;
struct ma
{
int x;
int y;
};
int dx[4] = { 0, 1, 0, -1 }, dy[4] = { 1, 0, -1, 0 };
char m[2200][2200];
int map[2200][2200];
int main()
{
int ans = 0;
int tate, yoko;
int n;
cin >> tate >> yoko >> n;
ma sta;
for (int i = 0; i < tate; i++)
{
for (int k = 0; k < yo... | a.cc: In function 'int main()':
a.cc:37:24: error: reference to 'map' is ambiguous
37 | memset(map, -1, sizeof(map));
| ^~~
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
fro... |
s564574146 | p00481 | C++ | #include<bits/stdc++.h>
using namespace std;
struct ma
{
int x;
int y;
};
int dx[4] = { 0, 1, 0, -1 }, dy[4] = { 1, 0, -1, 0 };
char m[1200][1200];
int map[1200][1200];
int main()
{
int ans = 0;
int tate, yoko;
int n;
cin >> tate >> yoko >> n;
ma sta;
for (int i = 0; i < tate; i++)
{
for (int k = 0; k < yo... | a.cc: In function 'int main()':
a.cc:37:24: error: reference to 'map' is ambiguous
37 | memset(map, -1, sizeof(map));
| ^~~
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
fro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.