submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s021787633
p00534
C++
#import<cstdio> #define k ff #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a<b?a:b int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:2:11: error: 'ff' was not declared in this scope 2 | #define k ff | ^~ a.cc:6:13: note: in expansion of macro 'k' 6 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i...
s301641766
p00534
C++
#import<cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a>b?a=b, int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:6:26: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w...
s507018403
p00534
C++
#import<cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a>b?a=b: int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:6:26: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w...
s927165532
p00534
C++
#import<cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a>b?a=b int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:6:26: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w...
s956758035
p00534
C++
#import<cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) if(a>b)a=b int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:6:26: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w...
s585600512
p00534
C++
#define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?a:b main(w,n,m,c[],d[],p[]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:5:5: error: expected constructor, destructor, or type conversion before '(' token 5 | main(w,n,m,c[],d[],p[]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | ^
s747422212
p00534
C++
#define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?a:b int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:5:26: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | ^~~~ a.cc: In function 'int main()': a.cc:3:14: erro...
s624840260
p00534
C++
#define k 1024 #define r(a) for(i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?a:b i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),0;}
a.cc:5:1: error: 'i' does not name a type 5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),0;} | ^ a.cc:5:24: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | i,w,n,m,c[k],d[k],p[k];ma...
s026409152
p00534
C++
#define k 1024 #define r(a) for(i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?:b i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
a.cc:5:1: error: 'i' does not name a type 5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);} | ^ a.cc:5:24: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | i,w,n,m,c[k],d[k],p...
s278853830
p00534
C++
#define k 1024 #define r(a) for(i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?a:b i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
a.cc:5:1: error: 'i' does not name a type 5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);} | ^ a.cc:5:24: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | i,w,n,m,c[k],d[k],p...
s350557158
p00534
C++
#define k 1024 #define r(a) for(i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?a:b main(i,w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
a.cc:5:5: error: expected constructor, destructor, or type conversion before '(' token 5 | main(i,w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);} | ^
s332582799
p00534
C++
#import<cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define c(a,b) a=a<b?a:b int w,n,m,d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(n)p[i]=1e9;r(m){s(&w)r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",p[0]),exit(0);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:6:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | int w,n,m,d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(n)p[i]=1e9;r(m){s(&w)r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n...
s089893181
p00534
C++
#import<cstdio> #define r(a) for(int i=0;i<a;i++) #define s scanf("%d",&w),w; #define c(a,b) a=a<b?a:b int w,n,m,d[999],p[999];main(){n=sm=ssr(n)d[i]=sr(n)p[i]=1e9;r(m){sr(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:5:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int w,n,m,d[999],p[999];main(){n=sm=ssr(n)d[i]=sr(n)p[i]=1e9;r(m){sr(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*...
s057348875
p00534
C++
#import<cstdio> #define r(a) for(int i=0;i<a;i++) #define s (scanf("%d",&w),w) #define c(a,b) a=a<b?a:b int w,n,m,d[999],p[];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:5:18: error: storage size of 'p' isn't known 5 | int w,n,m,d[999],p[];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p);} | ^ a.cc:...
s103932073
p00534
C++
#import<cstdio> #define r(a) for(int i=0;i<a;i++) #define s (scanf("%d",&w),w) #define c(a,b) a=a<b?a:b int d[999],p[999];main(w,n,m){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:5:23: error: expected constructor, destructor, or type conversion before '(' token 5 | int d[999],p[999];main(w,n,m){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n...
s295069796
p00534
C++
#import<cstdio> #define r(a)for(int i=0;i<a;i++) #define s(scanf("%d",&w),w) #define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:3:16: error: expected ',' or ')', found "(" 3 | #define s(scanf("%d",&w),w) | ^ a.cc:5:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int...
s867432828
p00534
C++
#import<cstdio>#define r(a)for(int i=0;i<a;i++)#define s (scanf("%d",&w),w)#define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio>#define r(a)for(int i=0;i<a;i++)#define s (scanf("%d",&w),w)#define c(a,b)a=a<b?a:b | ^~~~~~ a.cc:1:16: warning: extra tokens at end of #import directive 1 | #import<cstdio>#define r(a)for(int i=0;i<a;i++)#define s...
s603013977
p00534
C++
#define r(a,i)for(i=0;i<a;i++) #define s (scanf("%d",&w),w) #define c(a,b)a=a<b?a:b d[999],p[99];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
a.cc:4:1: error: 'd' does not name a type 4 | d[999],p[99];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | ^ a.cc:4:18: error: expected constructor, destructor, or type conversion before '(' token 4 | d[999],p[99];main(i,j,w,n,m){...
s732184015
p00534
C++
#define r(a,i)for(i=0;i<a;i++) #define s (scanf("%d",&w),w) #define c(a,b)a<b?:a=b d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
a.cc:4:1: error: 'd' does not name a type 4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | ^ a.cc:4:19: error: expected constructor, destructor, or type conversion before '(' token 4 | d[999],p[999];main(i,j,w,n,m...
s595264784
p00534
C++
#import<cstdio> #define D #define D r(a)for(int i=0;i<a;i++) D s (scanf("%d",&w),w) D c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:2:11: error: stray '#' in program 2 | #define D #define | ^ a.cc:3:1: note: in expansion of macro 'D' 3 | D r(a)for(int i=0;i<a;i++) | ^ a.cc:2:11: error: stray '#' in progr...
s033720220
p00534
C++
#import<iostream> #define r(a)for(int i=0;i<a;i++) #define s w<<std::cin; #define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:5:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d...
s041016995
p00534
C++
#import<iostream> #define r(a)for(int i=0;i<a;i++) #define s std::cin>>w; #define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:5:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d...
s634769229
p00534
C++
#import<map> #define r(a)for(int i=0;i<a;i++) #define s (std::cin>>w,w) #define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}cout<<*p<<endl;}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<map> | ^~~~~~ a.cc:5:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}cout<<*p<<endl;...
s893541770
p00534
C++
#import<algo.h> #define r(a)for(int i=0;i<a;i++) #define s (cin>>w,w) #define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}cout<<*p<<"\n";}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<algo.h> | ^~~~~~ a.cc:1:8: fatal error: algo.h: No such file or directory 1 | #import<algo.h> | ^~~~~~~~ compilation terminated.
s075387796
p00534
C++
#import<ios> #define r(a)for(int i=0;i<a;i++) #define s (cin>>w,w) #define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}cout<<*p<<"\n";}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<ios> | ^~~~~~ a.cc:5:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}cout<<*p<<"\n";...
s376664542
p00534
C++
#import<ios> #define r(a)for(int i=0;i<a;i++) #define s (std::cin>>w,w) #define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}std::cout<<*p<<"\n";}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<ios> | ^~~~~~ a.cc:5:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}std::cout<<*p<<...
s459861812
p00534
C++
#import<ios> #define r(a)for(int i=0;i<a;i++) #define s (scanf("%d",&w),w) #define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*w);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<ios> | ^~~~~~ a.cc:5:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*...
s557344565
p00534
C++
#import<cstdio> #define r(a)for(int i=0;i++<a;) #define s (scanf("%d",&w),w) #define c(a,b)a=a<b?a:b int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i-1],p[i]+w*d[n-i+1]);}printf("%d\n",*w);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:5:25: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | int w,n,m,d[999],p[999];main(){n=s;m=s;r(n)d[i]=s;r(n)p[i]=1e9;r(m){s;r(n)c(p[i-1],p[i]+w*d[n-i+1]);}printf("%d\n...
s501549714
p00534
C++
#include <iostream> #include<math.h> using namespace std; int kyori[1000]; int tennki[1000]; long long int dp[1000]; int main() { int n,m; cin>>n>>m; for(int i=0;i<n;i++){ cin>>kyori[i]; } for(int i=0;i<m;i++){ cin>>tennki[i]; } for(int i=0;i<1000;i++){ dp[i]=-1; } for(int day=0;day<m;day++){ for(int c...
a.cc: In function 'int main()': a.cc:23:50: error: no matching function for call to 'min(long long int&, int)' 23 | else{dp[city]=min(dp[city],kyori[city]*tennki[day]);} | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /...
s247887462
p00534
C++
#include <bits/stdc++.h> using namespace std; typedef lli long long int; int d[1000], c[1000]; int n, m; lli memo[1000][1000]; lli rec(int i, int j) { if (j == n) return 0; if (memo[i][j] >= 0) return memo[i][j]; lli res; if (m - j >= n - i) { res = rec(i + 1, j + 1) + d[i] * c[i]; } else { res = min(r...
a.cc:5:9: error: 'lli' does not name a type 5 | typedef lli long long int; | ^~~ a.cc:10:1: error: 'lli' does not name a type 10 | lli memo[1000][1000]; | ^~~ a.cc:12:1: error: 'lli' does not name a type 12 | lli rec(int i, int j) | ^~~ a.cc: In function 'int main()': a.cc:37:16: err...
s262328390
p00534
C++
#include <bits/stdc++.h> using namespace std; typedef long long int lli; int d[1000], c[1000]; int n, m; lli memo[1000][1000]; lli rec(int i, int j) { if (j == n) return 0; if (memo[i][j] >= 0) return memo[i][j]; lli res; if (m - j >= n - i) { res = rec(i + 1, j + 1) + d[i] * c[i]; } else { res = min(r...
a.cc: In function 'lli rec(int, int)': a.cc:26:16: error: 'dp' was not declared in this scope; did you mean 'dup'? 26 | return dp[i][j] = res; | ^~ | dup
s831770954
p00534
C++
#include <bits/stdc++.h> using namespace std; int n, m; int d[1000]; int c[1000]; int memo[1000][1000]; int rec(int day, int now) { if (now == n) return 0; if (memo[day][now] >= 0) return memo[day][now]; lli res; if (n - now < m - day) { res = min(rec(day + 1, now + 1) + d[now] * c[day], rec(day + 1, now))...
a.cc: In function 'int rec(int, int)': a.cc:17:9: error: 'lli' was not declared in this scope 17 | lli res; | ^~~ a.cc:20:17: error: 'res' was not declared in this scope; did you mean 'rec'? 20 | res = min(rec(day + 1, now + 1) + d[now] * c[day], rec(day + 1, now)); | ...
s407986558
p00534
C++
#include <stdio.h> #include <algorithm> using namespace std; const int MAX_N=1000; const int MAX_M=1000; const int INF=10000000; int dp[MAX_M+1][MAX_N+1]; int dis[MAX_N]; int wea[MAX_M]; int n,m; int rec(int i,int j){ if(dp[i][j]>=0){ return dp[i][j]; } int res; if(j==n){ return 0; } if(i==m){ ...
a.cc: In function 'int main()': a.cc:36:9: error: 'memset' was not declared in this scope 36 | memset(dp,-1,sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <cst...
s378295617
p00534
C++
#include <bits/stdc++.h> #define REP(i, n) for(int i=0; i<n; ++i) using namespace std; int dp[1003][1003]; int main() { int N, M; scanf("%d%d", &N, &M); int D[1000], C[1000]; REP(i, N) scanf("%d", &D[i]); REP(i, M) scanf("%d", &C[i]); memset(dp, 0x3f, sizeof(dp)); dp[0][0] = 0; for(int i=0; i<=N; i++){/%...
a.cc:19:49: error: stray '\32' in program 19 | for(int i=0; i<=N; i++){/%??????BY??????<U+001A>[??<U+0008><U+001A>??L<U+30BD><U+30BD><U+001A><U+30BD><U+30BD>SN??<U+001A>??????^??????<U+0011> | ^~~~~~~~ a.cc:19:53: error: stray '\10' in program 19 | ...
s300796439
p00534
C++
#include <iostream> using namespace std; #include <cstring> #include <algorithm> #define INF 1<<29 int dp[1000][1000]; int main(void){ int n, m; cin >> n >> m; int d[1000]; for (int i = 0; i < n; i++) cin >> d[i]; int c[1000]; for (int i = 0; i < m; i++) cin >> c[i]; for (int i = 0; i <= m; i++) dp[0][i...
a.cc: In lambda function: a.cc:25:30: error: expected '{' before '[' token 25 | do[i][j] = INF; | ^ a.cc: In function 'int main()': a.cc:25:30: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int') a.cc:26:25: error: expected 'w...
s697590792
p00534
C++
#include<stdio.h> long long int as[1001][1001]; int main(void) { long long int a,b,x[1001],s[1001],A=9223372036854775800,min=9223372036854775800,i,j; scanf("%lld %lld",&a,&b); for(i=1;i<=a;i++){ scanf("%lld",&x[i]); } for(i=1;i<=b;i++){ scanf("%lld",&s[i]); } for(i=0;i<=b;i++){ for(j=0;j<=a;j++){ as[i][...
a.cc: In function 'int main()': a.cc:41:18: error: expected '}' at end of input 41 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s505203096
p00534
C++
#include<iostream> #include<algorithm> using namespaces td; int n,m,a[1000],b[1000],dp[1000][1000]; int main(){ for(int i=0;i<1000000;i++)dp[i/1000][i%1000]=1000000007; cin>>n>>m;for(int i=0;i<n;i++)cin>>a[i]; for(int i=0;i<m;i++)cin>>b[i]; dp[0][0]=0; for(int i=0;i<m;i++){ for(int j=0;j<=n;j++){ dp[i+1][j+1]...
a.cc:3:7: error: expected nested-name-specifier before 'namespaces' 3 | using namespaces td; | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>n>>m;for(int i=0;i<n;i++)cin>>a[i]; | ^~~ | ...
s619434311
p00534
C++
lude <bits/stdc++.h> #define MAX 100000000; #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ int qa,b; cin>>a>>b; int dp[a+1][b+1],a1[a+1],b1[b+1]; r(i,a)cin>>a1[i+1]; r(i,b)cin>>b1[i+1]; r(i,a+1)(j,b+1)dp[i][j]=MAX; for(int i=1;i<=a;i++) for(int j=1;j<=b;j++){ dp[i][j]=min(dp[i-1][j-1]+...
a.cc:1:1: error: 'lude' does not name a type 1 | lude <bits/stdc++.h> | ^~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | cin>>a>>b; | ^~~ a.cc:7:14: error: 'a' was not declared in this scope 7 | cin>>a>>b; | ...
s153541446
p00534
C++
#include <bits/stdc++.h> #define MAX 100000000; #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ int qa,b; cin>>a>>b; int dp[a+1][b+1],a1[a+1],b1[b+1]; r(i,a)cin>>a1[i+1]; r(i,b)cin>>b1[i+1]; r(i,a+1)(j,b+1)dp[i][j]=MAX; for(int i=1;i<=a;i++) for(int j=1;j<=b;j++){ dp[i][j]=min(dp[i-1][j...
a.cc: In function 'int main()': a.cc:7:14: error: 'a' was not declared in this scope 7 | cin>>a>>b; | ^ a.cc:9:20: error: 'a1' was not declared in this scope; did you mean 'b1'? 9 | r(i,a)cin>>a1[i+1]; | ^~ | b1 a.cc:11:18: err...
s929181172
p00534
C++
#include <bits/stdc++.h> #define MAX 100000000; #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ int a,b; cin>>a>>b; int dp[a+1][b+1],a1[a+1],b1[b+1]; r(i,a)cin>>a1[i+1]; r(i,b)cin>>b1[i+1]; r(i,a+1)(j,b+1)dp[i][j]=MAX; for(int i=1;i<=a;i++) for(int j=1;j<=b;j++){ dp[i][j]=min(dp[i-1][j-...
a.cc: In function 'int main()': a.cc:11:18: error: 'j' was not declared in this scope 11 | r(i,a+1)(j,b+1)dp[i][j]=MAX; | ^
s989608417
p00534
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int dp[1050][1050]; int N,M; int C[1050],D[1050]; int main() { for(int i=0;i<1050;i++) { for(int j=0;j<1050;j++) { dp[i][j]=INF; } } cin >> N >> M; for(int i=0;i<N;i++)cin >> D[i]; for(int i=0;i<M;i++)cin >> C[i]; dp[0][0]=...
a.cc: In function 'int main()': a.cc:15:34: error: 'INF' was not declared in this scope 15 | dp[i][j]=INF; | ^~~ a.cc:26:38: error: 'INF' was not declared in this scope 26 | if(dp[i][j]==INF)continue; | ...
s107445004
p00534
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int dp[1050][1050]; int N,M; int C[1050],D[1050]; int main() { for(int i=0;i<1050;i++) { for(int j=0;j<1050;j++) { dp[i][j]=INF; } } cin >> N >> M; for(int i=0;i<N;i++)cin >> D[i]; for(int i=0;i<M;i++)cin >> C[i]; dp[0][0]=...
a.cc: In function 'int main()': a.cc:15:34: error: 'INF' was not declared in this scope 15 | dp[i][j]=INF; | ^~~ a.cc:26:38: error: 'INF' was not declared in this scope 26 | if(dp[i][j]==INF)continue; | ...
s508351334
p00534
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int dp[1050][1050]; int N,M; int C[1050],D[1050]; int main() { for(int i=0;i<1050;i++) { for(int j=0;j<1050;j++) { dp[i][j]=INF; } } cin >> N >> M; for(int i=0;i<N;i++)cin >> D[i]; for(int i=0;i<M;i++)cin >> C[i]; dp[0][0]=...
a.cc: In function 'int main()': a.cc:15:34: error: 'INF' was not declared in this scope 15 | dp[i][j]=INF; | ^~~ a.cc:26:38: error: 'INF' was not declared in this scope 26 | if(dp[i][j]==INF)continue; | ...
s215756745
p00534
C++
#include"bits/stdc++.h" //typedef ll long long using namespace std; int d[1001],c[1001]; int n,m; int minx=9999999; void sugii(int,long long,int,int); int main(){ cin>>n>>m; for(int i=1;i<=n;i++){ cin>>d[i]; } for(int i=1;i<=m;i++){ cin>>c[i]; } sugii(1,0,1,1); cout<<minx<<endl; } void sugii(int sumnichi,l...
a.cc: In function 'void sugii(int, long long int, int, int)': a.cc:22:25: error: no matching function for call to 'min(int&, long long int&)' 22 | minx=min(minx,hirou); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/incl...
s381263073
p00534
C++
#include"bits/stdc++.h" using namespace std; int d[1001],c[1001]; int n,m; int minx=9999999; void sugii(int,int,int,int); int main(){ cin>>n>>m; for(int i=1;i<=n;i++){ cin>>d[i]; } for(int i=1;i<=m;i++){ cin>>c[i]; } sugii(1,0,1,1); cout<<minx<<endl; } void sugii(int sumnichi,int hirou ,int n2,int m2){ if...
a.cc: In function 'void sugii(int, int, int, int)': a.cc:20:20: error: continue statement not within a loop 20 | if(m-m2<n2)continue; | ^~~~~~~~
s238358445
p00534
C++
#include"bits/stdc++.h" using namespace std; int d[1001],c[1001]; int n,m; int minx=9999999; void sugii(int,int,int,int); int main(){ cin>>n>>m; for(int i=1;i<=n;i++){ cin>>d[i]; } for(int i=1;i<=m;i++){ cin>>c[i]; } sugii(1,0,1,1); cout<<minx<<endl; } void sugii(int su...
a.cc: In function 'void sugii(int, int, int, int)': a.cc:20:20: error: continue statement not within a loop 20 | if(m-m2<n2)continue; | ^~~~~~~~ a.cc: At global scope: a.cc:31:9: error: expected unqualified-id before 'if' 31 | if(m-m2<n2)continue; | ^~
s120046198
p00534
C++
$routes=[] $distance=[] $condition=[] def counter count = 0 ->{ count += 1 return count } end def get_fatigue (now,m,n,now_place) inner=[] now.upto(m-n+now) do |i| inner.push($distance[now_place]*$condition[i-1])#疲労度 end $routes.push(inner) end a=gets.split("\s") n=a[0].to_i m=a[1].to_i n.ti...
a.cc:15:53: error: stray '#' in program 15 | inner.push($distance[now_place]*$condition[i-1])#疲労度 | ^ a.cc:1:1: error: '$routes' does not name a type 1 | $routes=[] | ^~~~~~~ a.cc:10:1: error: 'end' does not name a type 10 | end | ^~~
s428558611
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; class Pair{ int x; int y; Pair(int x,int y){ this.x=x; this.y=y; } } public staitc void main(String...
Main.java:19: error: <identifier> expected public staitc void main(String[] args) throws IOException{ ^ 1 error
s965343827
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; class Pair{ int x; int y; Pair(int x,int y){ this.x=x; this.y=y; } } public static void main(String...
Main.java:51: error: non-static variable this cannot be referenced from a static context que.offerLast(new Pair(i,j)); ^ 1 error
s293555662
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; static int[] d={-1,0,1}; static class Pair{ int x; int y; Pair(int x,int y){ this.x=x; this.y=y; } }...
Main.java:66: error: bad operand types for binary operator '&&' if(i==1&&j=1) continue loop; ^ first type: boolean second type: int 1 error
s524984084
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; static int[] d={-1,0,1}; static class Pair{ int x; int y; Pair(int x,int y){ this.x=x; this.y=y; } }...
Main.java:71: error: cannot find symbol else cnt2++; ^ symbol: variable cnt2 location: class Main Main.java:77: error: cannot find symbol if(cnt2+hxy<8) break loop; ^ symbol: variable cnt2 location: class Main 2 errors
s110869314
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; static int[] d={-1,0,1}; static class Pair{ int x; int y; Pair(int x,int y){ this.x=x; this.y=y; } }...
Main.java:70: error: array required, but int found if(h[nx][ny]==INF) cnt1++; ^ Main.java:72: error: array required, but int found if(cnt1>=h[x][y]){ ^ Main.java:77: error: array required, but int found if(cnt2+h[x][y]<8) break loop; ^ 3 errors
s376115425
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; static int[] d={-1,0,1}; static class Pair{ int x; int y; Pair(int x,int y){ this.x=x; this.y=y; } }...
Main.java:64: error: ';' expected int hxy=hmap[x][y] ^ 1 error
s557912412
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; static int[] d={-1,0,1}; static class TPair{ int t; int x; int y; TPair(int t,int x,int y){ this.t=t...
Main.java:78: error: not a statement que,offerLast(new TPair(ans+1,x,y)); ^ Main.java:78: error: ';' expected que,offerLast(new TPair(ans+1,x,y)); ^ Main.java:85: error: reached end of file while parsing } ^ 3 errors
s868693783
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; static int[] d={-1,0,1}; static class TPair{ int t; int x; int y; TPair(int t,int x,int y){ this.t=t...
Main.java:76: error: not a statement que,offerLast(new TPair(ans+1,x,y)); ^ Main.java:76: error: ';' expected que,offerLast(new TPair(ans+1,x,y)); ^ Main.java:83: error: reached end of file while parsing } ^ 3 errors
s086055645
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; static int[] d={-1,0,1}; static class TPair{ int t; int x; int y; TPair(int t,int x,int y){ this.t=t...
Main.java:52: error: cannot find symbol if(update){ ^ symbol: variable update location: class Main Main.java:76: error: cannot find symbol update=true; ^ symbol: variable update location: class Main 2 errors
s680701206
p00535
Java
import java.io.*; import java.util.StringTokenizer; import java.util.Deque; import java.util.ArrayDeque; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; static int[] d={-1,0,1}; static class TPair{ int t; int x; int y; TPair(int t,int x,int y){ this.t=t...
Main.java:87: error: missing return statement } ^ 1 error
s267023045
p00535
C
#include<stdio.h> int h ,w ; int mx[] = { 1 ,1 ,1 ,-1 ,-1 ,-1 ,0 ,0 } ; int my[] = { 1 ,-1 ,0 ,1 ,-1 ,0 ,1 ,-1 } ; char castle[ 1000 ][ 1000 ] ; char castles[ 1000 ][ 1000 ] ; char sand[ 1000 ][ 1000 ] ; int dead ; char del[ 999 * 999 ][ 2 ] ; int DEL ; #define x j + mx[ k ] #define y i + my[ k ] #define dy ...
main.c:127:19: error: expected ';', ',' or ')' before '=' token 127 | void check( int i = 0 ,int j = 0 ) | ^ main.c:147:20: error: expected ';', ',' or ')' before '=' token 147 | void checks( int i = 0 ,int j = 0 ) | ^
s598572415
p00535
C++
#include<iostream> #include<string> using namespace std; string S[2000]; int x[2000][2000]; int z[2000][2000]; int main() { int n, m; char T[10] = { '.','1','2','3','4','5','6','7','8','9' }; cin >> n >> m; for (int i = 0; i < n; i++) { cin >> S[i]; for (int j = 0; j < m; j++) { for (int k = 0; k < 10; k++...
a.cc: In function 'int main()': a.cc:27:17: error: 'memset' was not declared in this scope 27 | memset(z, 0, sizeof(z)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |...
s051511199
p00535
C++
// JOI14-quest5.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include <stdio.h> #include <stdlib.h> #include <queue> int height, width; int beach[1000][1000] = { 0 }; using namespace std; queue<int> que_i, que_j; int power(int i, int j) { int count = 0; if (beach[i - 1][j] == 0) { count++; } if (beach[i][j + 1] ...
a.cc:98:22: error: '_TCHAR' has not been declared 98 | int _tmain(int argc, _TCHAR* argv[]) | ^~~~~~
s486486582
p00535
C++
#include <iostream> #include <cstdlib> #include <queue> #include <Windows.h> using namespace std; int x, y; char m[1024][1024]; int map[1024][1024]; queue<pair<int, pair<int, int> > > q; pair<int, pair<int, int> > temp; int dx[8] = { 0, 0, 1, -1, 1, -1, 1, -1 }, dy[8] = { 1, -1, 0, 0, -1, -1, 1, 1 }; void check_ma...
a.cc:4:10: fatal error: Windows.h: No such file or directory 4 | #include <Windows.h> | ^~~~~~~~~~~ compilation terminated.
s115027162
p00535
C++
#include <queue> #include <cstdio> #include <string> #include <vector> #include <iostream> #include <algorithm> #pragma warning(disable : 4996) #define INF 1000000000 using namespace std; const vector<int> dx = { 0, 1, 1, 1, 0, -1, -1, -1 }; const vector<int> dy = { -1, -1, 0, 1, 1, 1, 0, -1 }; int H, W; vector<st...
a.cc: In function 'int main()': a.cc:70:78: error: too few arguments to function 'int check(int, int, int)' 70 | if (state[y2][x2] == INF && M[y2][x2] != '.' && check(x2, y2) >= M[y2][x2]) | ~~~~~^~~~~~~~ a.cc:21:5:...
s840614350
p00535
C++
#include <cstdio> #include <algorithm> #include <queue> using namespace std; int h, w, ans; int castle[1001][1001], times[1001][1001]; int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; char beach[1001][1001]; int main(){ scanf("%d%d", &h, &w); for(int i = 0; i < h; i++){ sc...
a.cc: In function 'int main()': a.cc:21:24: error: 'P' was not declared in this scope 21 | Q.push(P(i, j)); | ^ a.cc:29:9: error: 'P' was not declared in this scope 29 | P p = Q.front(); | ^ a.cc:31:30: error: 'p' was not declared in this scope ...
s900367172
p00535
C++
#include <cstdio> #include <algorithm> #include <queue> using namespace std; int h, w, ans; int castle[1001][1001], times[1001][1001]; int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; char beach[1001][1001]; int main(){ scanf("%d%d", &h, &w); for(int i = 0; i < h; i++){ sc...
a.cc: In function 'int main()': a.cc:21:24: error: 'P' was not declared in this scope 21 | Q.push(P(i, j)); | ^ a.cc:29:9: error: 'P' was not declared in this scope 29 | P p = Q.front(); | ^ a.cc:31:30: error: 'p' was not declared in this scope ...
s547051404
p00535
C++
#include <cstdio> #include <algorithm> #include <queue> using namespace std; int h, w, ans; int castle[1001][1001], times[1001][1001]; int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; char beach[1001][1001]; int main(){ scanf("%d%d", &h, &w); for(int i = 0; i < h; i++){ sc...
a.cc: In function 'int main()': a.cc:21:24: error: 'P' was not declared in this scope 21 | Q.push(P(i, j)); | ^ a.cc:41:24: error: 'P' was not declared in this scope 41 | Q.push(P(y, x)); | ^
s137631815
p00535
C++
#include <cstdio> #include <vector> #include <algorithm> using namespace std; int H, W; char s[1009][1009]; bool vis[1009][1009]; int main() { ????????scanf("%d%d", &H, &W); ????????for (int i = 0; i < H; i++) scanf("%s", s[i]); ????????vector<pair<int, int> > v; ????????for (int i = 0; i < H; i++) { ????????????????fo...
a.cc: In function 'int main()': a.cc:7:1: error: expected primary-expression before '?' token 7 | ????????scanf("%d%d", &H, &W); | ^ a.cc:7:2: error: expected primary-expression before '?' token 7 | ????????scanf("%d%d", &H, &W); | ^ a.cc:7:3: error: expected primary-expression before '?' token ...
s648537431
p00535
C++
#include "iostream" #include "queue" #include "Utility" #include "math.h" using namespace std; int H, W; char status[1002][1002]; int field[1002][1002]; pair<int, int> dir[8] = {make_pair(0,1),make_pair(1,1),make_pair(1,0),make_pair(1,-1),make_pair(0,-1),make_pair(-1,-1),make_pair(-1,0),make_pair(-1,1)}; queue<pair<in...
a.cc:3:10: fatal error: Utility: No such file or directory 3 | #include "Utility" | ^~~~~~~~~ compilation terminated.
s307290633
p00535
C++
#include <cstdio> #include <algorithm> #include <queue> using namespace std; typedef pair<int, int> P; int h, w, ans; int castle[1001][1001], times[1001][1001]; int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; char beach[1001][1001]; inline int input(){ int temp; scanf("%d", &temp); re...
a.cc: In function 'int main()': a.cc:22:18: error: incompatible types in assignment of 'int' to 'char [1001]' 22 | beach[i] = input(); | ~~~~~~~~~^~~~~~~~~
s741892807
p00535
C++
#include <cstdio> #include <algorithm> #include <queue> using namespace std; typedef pair<int, int> P; int h, w, ans; int castle[1001][1001], times[1001][1001]; int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; char beach[1001][1001]; inline int input_i(){ int temp; scanf("%d", &temp); ...
a.cc: In function 'int main()': a.cc:29:18: error: incompatible types in assignment of 'char' to 'char [1001]' 29 | beach[i] = input_c(); | ~~~~~~~~~^~~~~~~~~~~
s660629903
p00535
C++
#include <cstdio> #include <algorithm> #include <queue> using namespace std; typedef pair<int, int> P; int h, w, ans; int castle[1001][1001], times[1001][1001]; int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; char beach[1001][1001]; inline int input_i(){ int temp; scanf("%d", &temp); ...
a.cc:18:8: error: 'string' does not name a type; did you mean 'stdin'? 18 | inline string input_c(){ | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:29:20: error: 'input_s' was not declared in this scope; did you mean 'input_i'? 29 | beach[i] = input_s(); | ...
s468548139
p00535
C++
#include <cstdio> #include <algorithm> #include <queue> using namespace std; typedef pair<int, int> P; int h, w, ans; int castle[1001][1001], times[1001][1001]; int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; char beach[1001][1001]; inline int input_i(){ int temp; scanf("%d", &temp); ...
a.cc:18:8: error: 'string' does not name a type; did you mean 'stdin'? 18 | inline string input_s(){ | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:29:20: error: 'input_s' was not declared in this scope; did you mean 'input_i'? 29 | beach[i] = input_s(); | ...
s431982546
p00535
C++
#include <cstdio> #include <string> #include <algorithm> #include <queue> using namespace std; typedef pair<int, int> P; int h, w, ans; int castle[1001][1001], times[1001][1001]; int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}, dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; char beach[1001][1001]; inline int input_i(){ int temp; sca...
a.cc: In function 'int main()': a.cc:30:18: error: incompatible types in assignment of 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char [1001]' 30 | beach[i] = input_s(); | ~~~~~~~~~^~~~~~~~~~~
s744152774
p00535
C++
#include <queue> #include <string> #include <iostream> using namespace std; struct state { int x, y; }; int dx[] = { 0, 1, 1, 1, 0, -1, -1, -1 }; int dy[] = { 1, 1, 0, -1, -1, -1, 0, 1 }; int H, W, dist[1009][1009]; string s[1009]; int main() { ios::sync_with_stdio(false); cin >> H >> W; queue<state> que; for (int ...
a.cc: In function 'int main()': a.cc:37:33: error: 'sort' was not declared in this scope; did you mean 'short'? 37 | sort(v.begin(), v.end()); | ^~~~ | short
s428141033
p00535
C++
int main() { int h, w; cin >> h >> w; vector<string> vec; for (int i = 0; i < h; i++) { string t; cin >> t; vec.emplace_back(t); } set<pair<int, int>> se; for (int i = 1; i < h - 1; i++) { for (int j = 1; j < w - 1; j++) { if (vec[i][j] == '.')continue; int cnt = 0; for (int k = -1; k <= 1; k++)...
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin >> h >> w; | ^~~ a.cc:4:9: error: 'vector' was not declared in this scope 4 | vector<string> vec; | ^~~~~~ a.cc:4:16: error: 'string' was not declared in this scope 4 | ...
s255320228
p00535
C++
#include <iostream> #include <utility> #include <vector> using namespace std; int h,w; char bch[1003][1003]; int bfs () { int ans=0, cas[1003][1003],c; vector<pair<int, int>> que, vec; for (int i=1; i<h-1; i++) { for (int j=1; j<w-1; j++) { if (bch[i][j]!='.') ...
a.cc: In function 'int bfs()': a.cc:29:27: error: 'cbch' was not declared in this scope; did you mean 'bch'? 29 | cas[i][j]=cbch[i][j]-'0'-c; | ^~~~ | bch
s305355795
p00536
C++
#include <iostream> #include <fstream> #include <stdio.h> #include <math.h> #include <time.h> #include <string> #include <tuple> #include <vector> #include <map> #include <unordered_map> #include <list> #include <set> #include <stack> #include <queue> #include <cstdlib> #include <algorithm> #include <random> #include <...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from...
s960697885
p00536
C++
#include <iostream> #include <fstream> #include <stdio.h> #include <math.h> #include <time.h> #include <string> #include <tuple> #include <vector> #include <map> #include <unordered_map> #include <list> #include <set> #include <stack> #include <queue> #include <cstdlib> #include <algorithm> #include <random> #include <...
a.cc: In function 'void ato_search(int, long long int, long long int)': a.cc:89:45: error: base operand of '->' is not a pointer 89 | ans = max(ans, s+itr->second); | ^~
s008616833
p00536
C++
#include<stdio.h> #include<algorithm> #include<queue> using namespace std; long long c[32]; long long d[32]; int pow3[17]; pair<long long,long long>e[14444444]; long long segtree[1<<25]; long long mp; long long val; void query(int a,int b,int c,int d,int e){ queue<pair<pair<int,int>,int> > S; S.push(make_pair(make_pa...
a.cc: In function 'void query(int, int, int, int, int)': a.cc:16:25: error: 'class std::queue<std::pair<std::pair<int, int>, int> >' has no member named 'top'; did you mean 'pop'? 16 | int A=S.top().first.first; | ^~~ | pop a.cc:17:25: error...
s835496954
p00536
C++
//q6.cpp #include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <map> #include <set> typedef long long ll; using namespace std; #define MAX_N 16777216 long long n,d,xy[40][2],ans,c,f,s,f2; pair<p...
a.cc: In function 'void dfs1(ll, ll, ll, ll, ll)': a.cc:47:10: error: 'a' was not declared in this scope 47 | dfs1(a,h+1,As+xy[h][0],Bs,Ak+xy[h][1],Bk); | ^
s258451171
p00536
C++
//q6.cpp #include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <map> #include <set> typedef long long ll; using namespace std; #define MAX_N 16777216 long long n,d,xy[40][2],ans,c,f,s,f2; struct...
a.cc:39:17: error: no matching function for call to 'NODE::NODE()' 39 | NODE seg[MAX_N*2]; | ^ a.cc:28:5: note: candidate: 'NODE::NODE(ll, ll, ll)' 28 | NODE(ll A,ll B,ll C){ | ^~~~ a.cc:28:5: note: candidate expects 3 arguments, 0 provided a.cc:23:8: note: candidate: 'conste...
s324737840
p00536
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <complex> #include <string> #include <sstream> #include <algorithm> #include <numeric> #include <vector> #include <queue> #include <stack> #include <functional> #include <iostream> #include <map> #include <set> #include <cassert> using na...
a.cc:20:16: error: 'll' was not declared in this scope; did you mean 'all'? 20 | typedef vector<ll> vll; | ^~ | all a.cc:20:18: error: template argument 1 is invalid 20 | typedef vector<ll> vll; | ^ a.cc:20:18: error: template argument 2 is invalid ...
s385412534
p00536
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <complex> #include <string> #include <sstream> #include <algorithm> #include <numeric> #include <vector> #include <queue> #include <stack> #include <functional> #include <iostream> #include <map> #include <set> #include <cassert> using na...
a.cc:20:16: error: 'll' was not declared in this scope; did you mean 'all'? 20 | typedef vector<ll> vll; | ^~ | all a.cc:20:18: error: template argument 1 is invalid 20 | typedef vector<ll> vll; | ^ a.cc:20:18: error: template argument 2 is invalid ...
s256871007
p00536
C++
30 0 21242407673097 114177941238876 9058956712039 655951931783798 1428 120024239739588 4866474754 892147985766111 6004019739993 6730693917855 237175368445382 898689135417047 4100861535205 815351639026202 252865155476730 32521930501690 2854211223592 555151153366642 2609204062 750905089997617 72214127937270 4731834773811...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 30 0 | ^~
s025312205
p00536
C++
#ifndef ___Class_RMQ #define ___Class_RMQ #include <vector> #include <utility> #include <algorithm> using namespace std; template <typename Type> class RMQ { private: int size; vector<Type> minvalue; vector<Type> maxvalue; pair<Type, Type> _query(int a, int b, int k, int l, int r) { if (r <= a || b <= l) {...
a.cc: In constructor 'RMQ<Type>::RMQ(int)': a.cc:36:23: error: 'numeric_limits' was not declared in this scope 36 | INF = numeric_limits<Type>::max(); | ^~~~~~~~~~~~~~ a.cc:36:42: error: expected primary-expression before '>' token 36 | INF = numeric_lim...
s169805240
p00536
C++
#ifndef ___Class_RMQ #define ___Class_RMQ #include <vector> #include <utility> #include <algorithm> using namespace std; template <typename Type> class RMQ { private: int size; vector<Type> maxvalue; Type _query(int a, int b, int k, int l, int r) { if (r <= a || b <= l) { return -INF; } if (a <= l && r <=...
a.cc: In constructor 'RMQ<Type>::RMQ(int)': a.cc:35:23: error: 'numeric_limits' was not declared in this scope 35 | INF = numeric_limits<Type>::max(); | ^~~~~~~~~~~~~~ a.cc:35:42: error: expected primary-expression before '>' token 35 | INF = numeric_lim...
s844904227
p00536
C++
#ifndef ___Class_RMQ #define ___Class_RMQ #include <vector> #include <utility> #include <algorithm> using namespace std; template <typename Type> class RMQ { private: int size; vector<Type> maxvalue; Type _query(int a, int b, int k, int l, int r) { if (r <= a || b <= l) { return -INF; } if (a <= l && r <=...
a.cc: In constructor 'RMQ<Type>::RMQ(int)': a.cc:35:23: error: 'numeric_limits' was not declared in this scope 35 | INF = numeric_limits<Type>::max() / 2; | ^~~~~~~~~~~~~~ a.cc:35:42: error: expected primary-expression before '>' token 35 | INF = numeric...
s114975892
p00536
C++
#include<iostream> #include<cstring> #include<algorithm> #include<cmath> #include<utility> using namespace std; #define MAX_N 100000000 long long x_1[MAX_N]; long long y_1[MAX_N]; pair<long long, long long>x2[MAX_N]; long long y2[MAX_N]; int main() { long long x[15][2], y[15][2], d; int n, e, f; int mid; long lo...
/tmp/ccUUMZbZ.o: in function `main': a.cc:(.text+0x597): relocation truncated to fit: R_X86_64_PC32 against symbol `y2' defined in .bss section in /tmp/ccUUMZbZ.o a.cc:(.text+0x624): relocation truncated to fit: R_X86_64_PC32 against symbol `y2' defined in .bss section in /tmp/ccUUMZbZ.o a.cc:(.text+0x639): relocation ...
s942207945
p00536
C++
#include<vector> using namespace std; template <typename Type> class RMQ { private: int size; vector<Type> maxvalue; Type _query(int a, int b, int k, int l, int r) { if (r <= a || b <= l) { return INF; } if (a <= l && r <= b) { return maxvalue[k]; } Type vl = _query(a, b, 2 * k, l, (l + r) / 2); Type vr...
a.cc: In constructor 'RMQ<Type>::RMQ(int)': a.cc:28:23: error: 'numeric_limits' was not declared in this scope 28 | INF = numeric_limits<Type>::min(); | ^~~~~~~~~~~~~~ a.cc:28:42: error: expected primary-expression before '>' token 28 | INF = numeric_lim...
s887077706
p00536
C++
#include<vector> using namespace std; template <typename Type> class RMQ { private: int size; vector<Type> maxvalue; Type _query(int a, int b, int k, int l, int r) { if (r <= a || b <= l) { return INF; } if (a <= l && r <= b) { return maxvalue[k]; } Type vl = _query(a, b, 2 * k, l, (l + r) / 2); Type vr...
a.cc: In constructor 'RMQ<Type>::RMQ(int)': a.cc:28:23: error: 'numeric_limits' was not declared in this scope 28 | INF = numeric_limits<Type>::min(); | ^~~~~~~~~~~~~~ a.cc:28:42: error: expected primary-expression before '>' token 28 | INF = numeric_lim...
s786867891
p00536
C++
#include<iostream> #include<string> #include<Windows.h> using namespace std; string S; int main() { S = "abcdefghijklmnopqrstuvwxyz"; while (true) { S += S.substr(0, S.size() / 25); Sleep(20); } }
a.cc:3:9: fatal error: Windows.h: No such file or directory 3 | #include<Windows.h> | ^~~~~~~~~~~ compilation terminated.
s276961188
p00536
C++
#include <vector> #include <iostream> #include <algorithm> #define INF (1LL << 60) using namespace std; int n, u[2], mode, tar, pl, pr; long long d, x[30], y[30], ret, res, seg[33554432]; long long t[2][2][14348907]; void rec(int pos, long long a, long long b) { if (pos == tar) { t[0][mode][u[mode]] = a; t[1][mode...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/vector:62, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_val::operator()(_Iterator, _Value&) const [with _Iterator = long long int...
s271894815
p00536
C++
#include <vector> #include <iostream> #include <algorithm> #define INF (1LL << 60) using namespace std; int n, u[2], mode, tar; long long d, x[30], y[30], ret, res, seg[33554432], val[14348907]; pair<long long, long long> t[2][14348907]; inline void rec(int pos, long long a, long long b) { if (pos == tar) { t[mode][...
a.cc: In function 'int main()': a.cc:33:81: error: invalid operands of types 'long long int' and 'std::pair<long long int, long long int> [14348907]' to binary 'operator-' 33 | int pl = lower_bound(val[1], val[1] + u[1], -t[0][i].first - d) - t[1]; | ~~~~~~~~~~~~~~~~~~~...
s935893896
p00536
C++
#include <vector> #include <iostream> #include <algorithm> #define INF (1LL << 60) using namespace std; int n, u[2], mode, tar; long long d, x[30], y[30], ret, res, seg[33554432], val[14348907]; pair<long long, long long> t[2][14348907]; inline void rec(int pos, long long a, long long b) { if (pos == tar) { t[mode][...
In file included from /usr/include/c++/14/vector:62, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of '_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = long long int; _Tp = long long int; _Compare = __gnu_cxx...
s015022373
p00536
C++
#include <ctime> #include <vector> #include <iostream> #include <algorithm> #define INF (1LL << 60) using namespace std; int n, u[2], mode, tar; long long d, x[30], y[30], ret, seg[16777216], val[8388608]; pair<long long, long long> t[2][8388608]; inline void rec(int pos, long long a, long long b) { if (pos == tar)...
a.cc: In function 'void rec(int, long long int, long long int)': a.cc:15:8: error: 'N' was not declared in this scope 15 | if(N > 10 && rand() % 4 != 0) rec(pos + 1, a, b); | ^
s599496628
p00536
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <tuple> #include <map> #define int long long #define INF 1e18 #define MINF 1e18 * - 1 using namespace std; typedef pair<int, int> P; signed main(){ int n, d, ans = 0; int x[31], y[31]; map<int, int> dp[31]; vector<P> d1, d2; cin >...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from...
s155106199
p00536
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <tuple> #include <map> #define int long long #define INF 1e18 #define MINF 1e18 * - 1 using namespace std; typedef pair<int, int> P; signed main(){ int n, d, ans = 0; int x[31], y[31]; map<int, int> dp[31]; vector<P> d1, d2; cin >...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from...
s713056182
p00536
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <tuple> #include <map> #define int long long #define INF 1e18 using namespace std; typedef pair<int, int> P; signed main(){ int n, d, ans = 0; int x[31], y[31]; map<int, int> dp[31]; vector<P> d1, d2; cin >> n >> d; for (int i =...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from...
s455046016
p00536
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <map> #define int long long using namespace std; typedef pair<int, int> P; signed main(){ int n, d, ans = 0; int x[31], y[31]; map<int, int> dp[31]; vector<P> d1, d2; cin >> n >> d; for (int i = 1; i <= n; i++) { cin >> x[i] >>...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from...
s352322758
p00536
C++
#include<iostream> #include <map> #include <algorithm> #include <vector> #include <iterator> #define int long long #define INF 1e18 using namespace std; typedef pair<int, int> P; signed main() { int n, d, ans = 0; int x[31], y[31]; map<int, int> dp[2]; vector<P> d1, d2; cin >> n >> d; for (int i = 1; i <= n; i++)...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s654062905
p00536
C++
#include<iostream> #include <map> #include <algorithm> #include <vector> #include <iterator> #define int long long #define INF 1e18 using namespace std; typedef pair<int, int> P; signed main() { int n, d, ans = 0, sum[31] = {}, sum2[31] = {}; int x[31], y[31]; map<int, int> dp[2]; vector<P> d1, d2; cin >> n >> d; ...
a.cc: In function 'int main()': a.cc:97:21: error: redeclaration of 'long long int itr' 97 | int itr = upper_bound(d2.begin(), d2.end(), p) - d2.begin(); | ^~~ a.cc:82:21: note: 'long long int itr' previously declared here 82 | int itr = upper_bound(d2.beg...