submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s328192891
p01518
C++
#include <algorithm> #include <queue> #include <iostream> #include <set> #include <cstdio> #include <complex> #include <cmath> #include <cfloat> #define REP(i,n) for(int i=0; i<(int)(n); i++) inline int getInt(){ int s; scanf("%d", &s); retu inline double getDouble(){ double s; scanf("%lf", using namespace std; type...
a.cc: In function 'int getInt()': a.cc:12:46: error: 'retu' was not declared in this scope 12 | inline int getInt(){ int s; scanf("%d", &s); retu | ^~~~ a.cc:63:9: error: 'P' does not name a type; did you mean 'PP'? 63 | const P base; | ^ | ...
s444469727
p01519
C++
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; #define REP(i, n) for(int i=0;i<(int)(n);i++) typedef long long ll; typedef vector<int> vi; const int MOD = 1000003; int n, m; vector<vi> g; vi solve(int l, int r, int gi){ vi res({1, 1}); for(int i=l;i<r;i++){ if(gi...
/usr/bin/ld: /tmp/ccpgQu64.o: relocation R_X86_64_32S against symbol `esp_org' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status
s977828449
p01519
C++
#include <iostream> #include<string> #include <complex> #include<list> #include<float.h> #include <functional> #include <hash_map.h> //lib using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define REP0(i,n) REP(i,0,n) #define foreach(it,o) for(__typeof((o).begin()) it=(o).begin(); it!=(o).end(); ++it) i...
a.cc:7:10: fatal error: hash_map.h: No such file or directory 7 | #include <hash_map.h> | ^~~~~~~~~~~~ compilation terminated.
s708828989
p01519
C++
#include <iostream> #include <string> #include <sstream> using namespace std; int road[5000][5000]; int n,m; int solve(int start, int end, int now){ int i,j,sum=0; // for(j=now;j--;)printf(" "); if(start+1==end){ // for(j=now;j--;)printf(" "); // printf("set %d %d\n", start, end); return 1; } for(i=start;i<=...
a.cc: In function 'int main()': a.cc:33:17: error: 'memset' was not declared in this scope 33 | memset(road,0,sizeof(road)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <sstream> +...
s711943342
p01519
C++
#include <iostream> #include <cstring> using namespace std; char road[50050][50050]; int n,m; int solve(int start, int end){ int i,sum=0; // for(j=now;j--;)printf(" "); if(start+1==end){ // for(j=now;j--;)printf(" "); // printf("set %d %d\n", start, end); return 1; } for(i=start;i<=end;i++){ int ret=1; i...
/tmp/cccCdc2O.o: in function `main': a.cc:(.text+0x211): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cccCdc2O.o a.cc:(.text+0x297): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccCdc2O.o a.cc:(.text+0x2a2): relocation tr...
s198526095
p01520
C
n,t,e,x,r=-1; main(){ scanf("%d%d%d",&n,&t,&e); for(;i<n;t-e<=(t+e)/x*x&&r=i+1;i++)scanf("%d",&x); printf("%d\n",r); }
main.c:1:1: warning: data definition has no type or storage class 1 | n,t,e,x,r=-1; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int] 1 | n,t,e,x,r=-1; | ^ main.c:1:5: error: type de...
s004131418
p01520
C
n,t,e,x,r=-1; main(){ scanf("%d%d%d",&n,&t,&e); for(;i<n;t-e<=(t+e)/x*x&&r=i+1,i++)scanf("%d",&x); printf("%d\n",r); }
main.c:1:1: warning: data definition has no type or storage class 1 | n,t,e,x,r=-1; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int] 1 | n,t,e,x,r=-1; | ^ main.c:1:5: error: type de...
s328047707
p01520
C
n,i,t,e,x,r=-1; main(){ scanf("%d%d%d",&n,&t,&e); for(;i<n;t-e<=(t+e)/x*x&&r=i+1,i++)scanf("%d",&x); printf("%d\n",r); }
main.c:1:1: warning: data definition has no type or storage class 1 | n,i,t,e,x,r=-1; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] 1 | n,i,t,e,x,r=-1; | ^ main.c:1:5: error: typ...
s101363541
p01520
C
i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);}
main.c:1:1: warning: data definition has no type or storage class 1 | i,r=-1;main(n,t,e,x){for(scanf("%d%d%d",&n,&t,&e);i<n;(t-e<=(t+e)/x*x)&&r=i+1,i++)scanf("%d",&x);r=!printf("%d\n",r);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:1:3: error: type defaults to ...
s402339634
p01520
C
i,r=-1;main(t,e,x){for(scanf("%*d%d%d",&t,&e);~scanf("%d",&x);(t-e<=(t+e)/x*x)&&r=i+1,i++)r=!printf("%d\n",r);}
main.c:1:1: warning: data definition has no type or storage class 1 | i,r=-1;main(t,e,x){for(scanf("%*d%d%d",&t,&e);~scanf("%d",&x);(t-e<=(t+e)/x*x)&&r=i+1,i++)r=!printf("%d\n",r);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' i...
s292114255
p01520
C
#include <stdio.h> int main(void) { int n, t, e; int x[100]; int i; int time; scanf("%d %d %d", &n, &t, &e); for (i = 0; i < n; i++){ scanf("%d", &x[i]); } ans = -1; time = t - e; while (time <= t + e){ for (i = 0; i <= n; i++){ if (!(time % x[i])){ break; } } time++; } printf("%d\n...
main.c: In function 'main': main.c:16:9: error: 'ans' undeclared (first use in this function) 16 | ans = -1; | ^~~ main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in
s401093138
p01520
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); for(int d=0;d<a;d++){ int e; cin>>e; int f=b/e; f*=e; if(f>=b-c){printf("%d\n",f);return;} f+=e;; if(f<=b+c){printf("%d\n",f);return;} } printf("-1\n"); }
a.cc: In function 'int main()': a.cc:12:37: error: return-statement with no value, in function returning 'int' [-fpermissive] 12 | if(f>=b-c){printf("%d\n",f);return;} | ^~~~~~ a.cc:14:37: error: return-statement with no value, in function returning 'int' [-fpermissi...
s567822323
p01521
C
char s[99];main(){gets(s);puts(*s=='x'?s+strlen(s)-1:"o");exit(0);}
main.c:1:12: error: return type defaults to 'int' [-Wimplicit-int] 1 | char s[99];main(){gets(s);puts(*s=='x'?s+strlen(s)-1:"o");exit(0);} | ^~~~ main.c: In function 'main': main.c:1:19: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 1 | char s[99];main(){gets(...
s503327937
p01521
C
誰損多#include <stdio.h> #include <string.h> int main(void){ char N[51]; int i; scanf("%s" ,N); if( N[0] == N[strlen(N)-1] ){ printf("%c\n",N[0]); } else{ printf("o\n"); } return 0; }
main.c:1:7: error: stray '#' in program 1 | 誰損多#include <stdio.h> | ^ main.c:1:1: error: unknown type name '\U00008ab0\U0000640d\U0000591a' 1 | 誰損多#include <stdio.h> | ^~~~~~ main.c:1:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | 誰損多#include <stdio.h> ...
s999096542
p01521
C++
#include <iostream> #include <string> int main(){ string s; cin >> s; int c = 0; for(int i=0;i<s.size();i++){ if(s[i]!=s[i+1])c++; } if(c%2)cout << 'o' << endl; else cout << s[0] << endl; }
a.cc: In function 'int main()': a.cc:5:9: error: 'string' was not declared in this scope 5 | string s; | ^~~~~~ a.cc:5:9: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/...
s074877223
p01521
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string osr; size_t pla; cin >> osr; if(osr[0] != 'o' && if(osr.find('o') != -1)) { for(int i = 0; i < osr.size(); i++) { if(osr[i] != 'x') break; osr[i] = 'o'; } } for(int i = 0; i < ...
a.cc: In function 'int main()': a.cc:12:23: error: expected primary-expression before 'if' 12 | if(osr[0] != 'o' && if(osr.find('o') != -1)) { | ^~ a.cc:12:22: error: expected ')' before 'if' 12 | if(osr[0] != 'o' && if(osr.find('o') != -1)) { | ~ ^~~ ...
s378332833
p01521
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string osr; size_t pla; int size; cin >> osr; size = osr.size(); if(osr[0] != 'o' && (osr.find('o') != -1)) { for(int i = 0; i < size; i++) { if(osr[i] != 'x') break; osr[i] = 'o'; } ...
a.cc: In function 'int main()': a.cc:48:5: error: 'else' without a previous 'if' 48 | else if(osr[size] != 'o') { | ^~~~ a.cc: At global scope: a.cc:58:3: error: 'cout' does not name a type 58 | cout << osr[0] << endl; | ^~~~ a.cc:60:3: error: expected unqualified-id before 'return' 60 ...
s650503620
p01521
C++
#include <iostream> #include <string> int main(){ string in; cin >> in; if(in[0]==in[in.size()-1]) cout<<in[0]<<endl; else cout<<"o"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'string' was not declared in this scope 6 | string in; | ^~~~~~ a.cc:6:9: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++...
s638683377
p01522
C++
using namespace std; int main(){ int n,k,w,p,x,y,cnt; bool t[51][51],c[51]; char a; cin>>n>>k; cnt=0; for(int i=0;i<51;i++){ c[i]=false; for(int j=0;j<51;j++)t[i][j]=false; } for(int i=0;i<k;k++){ cin>>w; t[i][w]=true; scanf("%c",&a); if(a!=' ')continue; } cin>>p; for(int i=0;i...
a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin>>n>>k; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:17:3: error: 'scanf' w...
s204596080
p01523
Java
import java.util.*; class Powor{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int a[] = new int[m+1]; int b[] = new int[m+1]; int answer = 0; int maxb = -1; int maxidx = -1; int work = 1; boolean flag ...
Main.java:93: error: class, interface, enum, or record expected } ^ 1 error
s696594378
p01523
Java
import java.util.*; class Powor{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int a[] = new int[m+1]; int b[] = new int[m+1]; int answer = 0; int maxb = -1; int maxidx = -1; int work = 1; boolean flag ...
Main.java:77: error: break outside switch or loop break; ^ 1 error
s383071268
p01523
Java
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int a[] = new int[m+1]; int b[] = new int[m+1]; int answer = 0; int maxb = -1; int maxidx = -1; int work = 1; boolean flag =...
Main.java:15: error: ';' expected boolean hflag == true; ^ 1 error
s549478655
p01523
C++
#include <stdio.h> int n, m, a[100], b[100]; int main() { scanf("%d%d", &n, &m); for(int i = 0; i < m; i++) scanf("%d%d", &a[i], &b[i]); while(l <= m) { int ptr = -1; for(int j = 0; j < m; j++) { if(a[i] <= l) ptr = j; } if(ptr == -1) { printf("Impossible\n"); return 0; } l = b[ptr] + ; } prin...
a.cc: In function 'int main()': a.cc:6:15: error: 'l' was not declared in this scope 6 | while(l <= m) { | ^ a.cc:9:30: error: 'i' was not declared in this scope 9 | if(a[i] <= l) ptr = j; | ^ a.cc:15:30: error: expected prim...
s318968282
p01523
C++
#include <stdio.h> int n, m, a[100], b[100]; int main() { scanf("%d%d", &n, &m); for(int i = 0; i < m; i++) scanf("%d%d", &a[i], &b[i]); int l = 1, c = 0; while(l <= m) { int ptr = -1; for(int j = 0; j < m; j++) { if(a[i] <= l) ptr = j; } if(ptr == -1) { printf("Impossible\n"); return 0; } l = ...
a.cc: In function 'int main()': a.cc:10:30: error: 'i' was not declared in this scope 10 | if(a[i] <= l) ptr = j; | ^
s454990708
p01523
C++
#include <iostream> #include <vector> #define rep(i ,a) for(int i = 0; i < (a); i++) #define all(u) (u).begin(), (u).end() using namespace std; typedef pair<int, int> pii; int N, M; vector<pii> inter; int main() { cin >> N >> M; inter.resize(M); rep(i, M) cin >> inter[i].first >> inter[i].second; sort(all(int...
a.cc: In function 'int main()': a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(all(inter)); | ^~~~ | short
s714935920
p01523
C++
#include<iostream> #include<vector> #include<map> #include<queue> using namespace std; typedef pair<int, int> P; vector<P> edge[500]; int dist[1000]; int n, m, a, b; int main(){ cin >> n >> m; for(int i = 0;i < m;i++){ cin >> a >> b; for(int j = a;j <= b;j++){ edge[j].push_back(P(200 + i, 1)); edge[200 + ...
a.cc: In function 'int main()': a.cc:23:33: error: 'INF' was not declared in this scope 23 | fill(dist, dist + 1000, INF); | ^~~
s176792640
p01524
C
i,j,k,c,N;main(){scanf("%d",&N);for(;i<N;i++,k=c==N-1?i:k)for(c=j=0;j<=N;j++)c+=getchar()=='o'?1:0;for(i=1000;i--;)printf("%d\n",k?k:rand()%N+1);}
main.c:1:1: warning: data definition has no type or storage class 1 | i,j,k,c,N;main(){scanf("%d",&N);for(;i<N;i++,k=c==N-1?i:k)for(c=j=0;j<=N;j++)c+=getchar()=='o'?1:0;for(i=1000;i--;)printf("%d\n",k?k:rand()%N+1);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:1...
s239967769
p01524
C
int i,j,k,c,N;main(){scanf("%d",&N);for(;i<N;i++,k=c==N-1?i:k)for(c=j=0;j<=N;j++)c+=getchar()=='o'?1:0;for(i=1000;i--;)printf("%d\n",k?k:rand()%N+1);}
main.c:1:15: error: return type defaults to 'int' [-Wimplicit-int] 1 | int i,j,k,c,N;main(){scanf("%d",&N);for(;i<N;i++,k=c==N-1?i:k)for(c=j=0;j<=N;j++)c+=getchar()=='o'?1:0;for(i=1000;i--;)printf("%d\n",k?k:rand()%N+1);} | ^~~~ main.c: In function 'main': main.c:1:22: error: implicit declaratio...
s470339486
p01524
C
main(i,j,k,c,N){scanf("%d",&N);for(;i<N;i++,k=c==N-1?i:k)for(c=j=0;j<=N;j++)c+=getchar()=='o'?1:0;for(i=1000;i--;)printf("%d\n",k?k:rand()%N+1);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(i,j,k,c,N){scanf("%d",&N);for(;i<N;i++,k=c==N-1?i:k)for(c=j=0;j<=N;j++)c+=getchar()=='o'?1:0;for(i=1000;i--;)printf("%d\n",k?k:rand()%N+1);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplici...
s303843093
p01524
C
#include<stdio.h> #include<stdlib.h> a[999],i,n;main(){for(scanf("%d",&n);n--;)scanf("%*s");for(puts("1");++n<999;printf("%d\n",a[rand()%i]))fflush(stdout),scanf("%d",a+i++);}
main.c:3:1: warning: data definition has no type or storage class 3 | a[999],i,n;main(){for(scanf("%d",&n);n--;)scanf("%*s");for(puts("1");++n<999;printf("%d\n",a[rand()%i]))fflush(stdout),scanf("%d",a+i++);} | ^ main.c:3:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:3:8: erro...
s044850860
p01524
C
#include<stdio.h> rand();int a[999],i,n;main(){for(scanf("%d",&n);n--;)scanf("%*s");for(puts("1");++n<999;printf("%d\n",a[rand()%i]))fflush(stdout),scanf("%d",a+i++);}
main.c:2:1: warning: data definition has no type or storage class 2 | rand();int a[999],i,n;main(){for(scanf("%d",&n);n--;)scanf("%*s");for(puts("1");++n<999;printf("%d\n",a[rand()%i]))fflush(stdout),scanf("%d",a+i++);} | ^~~~ main.c:2:1: error: type defaults to 'int' in declaration of 'rand' [-Wimplicit-int]...
s536883352
p01524
C
#include <string.h> #define BIAS 1.2 typedef struct { char result[16]; int strength; int move_number; } move; int func_strength(int N, char array[]) { int i; int ans = 0; for(i = 0; i < N; i++) if(array[i] == 'o') ans++; return ans; } void sort_strength_order(int N, move array[]) { int i; int sorted...
main.c: In function 'main': main.c:62:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 62 | scanf("%d", &N); | ^~~~~ main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 1 | #include <string.h> +++ |+#include <stdio.h> 2 | main...
s232448799
p01524
C
#include <iostream> #include <random> using namespace std; #define loop(i,a,b) for(int i=a; i<(int)(b); i++) #define rep(i,b) loop(i,0,b) int main(){ random_device seed; int n; cin >> n; rep(i,1000){ printf("%d\n", seed()%n); fflush(stdout); } }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s502677441
p01524
C++
#include <iostream> #include <string> #include <cstdio> using namespace std; int main(){ int n; cin >> n; string s[n]; for(int i=0; i < n; i++) cin >> s[i]; int m = 0, ans = 0; for(int i=0; i < n; i++){ int count = 0; for(int j=0; j< s[i].size(); j++) if(s[i][j] == 'o' || s[i][...
a.cc: In function 'int main()': a.cc:20:31: error: 'a' was not declared in this scope 20 | int p; cin >> p; p--; a[p]++; | ^
s374478030
p01524
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define mp(a,b) make_pair((a),(b)) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define dump(x) #endif typedef long...
a.cc: In function 'void Solve()': a.cc:51:27: error: redeclaration of 'std::vector<std::pair<int, int> > ps' 51 | vector<pii> ps(n),ps(n); | ^~ a.cc:51:21: note: 'std::vector<std::pair<int, int> > ps' previously declared here 51 | vector<pii> ps(n),ps(n); | ...
s630172730
p01524
C++
#include<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; int N; char a[110][110]; int win[110]; int main(){ srand((unsigned int)time(NULL)); cin >> N; rep(i,N) { string s; cin >> s; rep(j,N) { a[i][j] = s[j]; if( j < i && a[i][j]...
a.cc: In function 'int main()': a.cc:24:39: error: 'win_p' was not declared in this scope; did you mean 'wint_t'? 24 | rep(i,N) if( win[maxi_p] < win[i] ) win_p = i; | ^~~~~ | wint_t
s732241025
p01524
C++
#include<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; int N; char a[110][110]; int win[110]; int main(){ srand((unsigned int)time(NULL)); cin >> N; rep(i,N) { string s; cin >> s; rep(j,N) { a[i][j] = s[j]; if( j < i && a[i][j]...
a.cc: In function 'int main()': a.cc:34:28: error: expected primary-expression before '?' token 34 | if( rand() % 1000 >= ???30 ) { | ^ a.cc:34:29: error: expected primary-expression before '?' token 34 | if( rand() % 1000 >= ???30 ) { | ...
s094674301
p01524
C++
#include<iostream> #include<ctime> #include<vector> #include<cstdlib> using namespace std; int main() { srand((unsigned)time(NULL)); int n; char a[11][11]; int b[11]; vector<int>d[11]; int judge_ai_hand; for (int i = 0; i < 11; i++) { b[i] = 0; } cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j...
a.cc: In function 'int main()': a.cc:29:32: error: 'e' was not declared in this scope 29 | if (ok == 0) { e = (unsigned)rand() % n + 1; } | ^ a.cc:30:33: error: 'e' was not declared in this scope 30 | cout << d[maxn][e] + 1 << endl; | ...
s119574012
p01524
C++
#include <time.h> #include <stdio.h> #include <stdlib.h> int n; char c[11][11]; int main() { scanf("%d", &n); for(int i = 0; i < n; i++) scanf("%s", &s[i]); int e = rand() % n + 1, f; for(int i = 0; i < 1000; i++) { printf("%d\n", e); fflush(stdout); scanf("%d", &f); if(c[e - 1][f - 1] == 'x') e = rand() % n ...
a.cc: In function 'int main()': a.cc:7:49: error: 's' was not declared in this scope 7 | for(int i = 0; i < n; i++) scanf("%s", &s[i]); | ^
s952881182
p01524
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))<<endl template<class T,class U> ostream& operator<<(ostream& o, const pa...
a.cc: In function 'int main()': a.cc:21:33: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'char') 21 | rep(i,n)rep(j,n) w[i]+=(s[i]=='o'...
s518530779
p01524
C++
#include<iostream> #include<ctime> #include<cstdlib> using namespace std; int main(){ srand(unsigned(time(NULL))); char judge[20][20]; int N; cin>>N; for(int i=0;i<N;i++){ cin>>judge[i]; max[i]=0; } int n; for(int i=0;i<1000;i++){ cout<<rand()%N+1<<endl; cin>>n; fflush(stdout); } }
a.cc: In function 'int main()': a.cc:14:20: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 14 | max[i]=0; | ^
s201404440
p01524
C++
#include <stdio.h> #include <iostream> int main(){ int N; cin>>n; if(N==10){ for(int i=0;i<1000000000;i++); }else{ int a=1/0; }}
a.cc: In function 'int main()': a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>n; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard in...
s854771984
p01524
C++
#include <iostream> using namespace std; int main(){ int N; cin>>n; if(N==10){ for(int i=0;i<1000000000;i++); }else{ int a=1/0; }}
a.cc: In function 'int main()': a.cc:7:6: error: 'n' was not declared in this scope 7 | cin>>n; | ^ a.cc:11:8: warning: division by zero [-Wdiv-by-zero] 11 | int a=1/0; | ~^~
s845909668
p01524
C++
#include<iostream.h> int a=1,c,r,v[999];main(char t){cin>>c;c--;cin>>&t);for(;c++<999;cin>>v[c],a=v[r=(r-~r)%~c])cout<<a<<endl;}
a.cc:1:9: fatal error: iostream.h: No such file or directory 1 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s772035912
p01524
C++
#include<iostream> using namespace std;int a=1,c,r,v[999];main(char t){cin>>c;c--;cin>>&t);for(;c++<999;cin>>v[c],a=v[r=(r-~r)%~c])cout<<a<<endl;}
a.cc:2:40: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | using namespace std;int a=1,c,r,v[999];main(char t){cin>>c;c--;cin>>&t);for(;c++<999;cin>>v[c],a=v[r=(r-~r)%~c])cout<<a<<endl;} | ^~~~ a.cc:2:40: warning: first argument of 'int ma...
s897093252
p01524
C++
#include <bits/stdc++.h> #include <unistd.h> #define loop(i,a,b) for(int i=(a); i<int(b); i++) #define rep(i,n) loop(i,0,n) using namespace std; inline unsigned random() { static unsigned x = 123456789; static unsigned y = 362436069; static unsigned z = 521288629; static unsigned w = 88675123; un...
a.cc:9:17: error: ambiguating new declaration of 'unsigned int random()' 9 | inline unsigned random() { | ^~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42, from a.cc:1: /usr/include/stdlib....
s108962071
p01524
C++
#include <bits/stdc++.h> #include <unistd.h> #define loop(i,a,b) for(int i=(a); i<int(b); i++) #define rep(i,n) loop(i,0,n) using namespace std; inline unsigned random() { static unsigned x = 123456789; static unsigned y = 362436069; static unsigned z = 521288629; static unsigned w = 88675123; un...
a.cc:9:17: error: ambiguating new declaration of 'unsigned int random()' 9 | inline unsigned random() { | ^~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42, from a.cc:1: /usr/include/stdlib....
s097599359
p01525
C++
#include <iostream> #include <vector> #include <cstdlib> #include <queue> #include <ctime> #include <map> #include <complex> using namespace std; typedef complex<double> P; struct NODE{ long long w,t,x,i; NODE(){} NODE(long long w,long long t,long long x,long long i) : w(w) , t(t) , x(x) , i(i) {} }; bool cmp(const...
a.cc: In function 'int main()': a.cc:47:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 47 | sort(info,info+N,cmp); | ^~~~ | sqrt
s849212079
p01529
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define mp(a,b) make_pair((a),(b)) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define dump(x) #endif typedef long...
a.cc: In function 'void Solve()': a.cc:36:9: error: expected initializer before 'static' 36 | static ll w[4001],s[4001][4001],dp[4001][4001]; | ^~~~~~ a.cc:38:27: error: 'w' was not declared in this scope 38 | rep(i,0,n) cin >> w[i]; | ^ a.cc:42:25: er...
s113666480
p01529
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define mp(a,b) make_pair((a),(b)) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define dump(x) #endif typedef long...
a.cc: In function 'void Solve()': a.cc:36:9: error: expected initializer before 'static' 36 | static ll w[4001],s[4001][4001],dp[4001][4001]; | ^~~~~~ a.cc:38:27: error: 'w' was not declared in this scope 38 | rep(i,0,n) cin >> w[i]; | ^ a.cc:42:25: er...
s799585664
p01529
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <tuple> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <set> #include <map> #include <numeric> #include <unordered_map> #include <unordered_set> #include <comple...
a.cc: In member function 'matrix<T>& matrix<T>::operator+=(const matrix<T>&)': a.cc:209:26: error: 'a' was not declared in this scope 209 | if (s != a.s)throw runtime_error("matrix error"); | ^ a.cc:211:72: error: 'a' was not declared in this scope 211 | ...
s233037084
p01529
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <tuple> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <set> #include <map> #include <numeric> #include <unordered_map> #include <unordered_set> #include <comple...
a.cc: In member function 'matrix<T>& matrix<T>::operator+=(const matrix<T>&)': a.cc:209:26: error: 'a' was not declared in this scope 209 | if (s != a.s)throw runtime_error("matrix error"); | ^ a.cc:211:72: error: 'a' was not declared in this scope 211 | ...
s833816771
p01529
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <tuple> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <set> #include <map> #include <numeric> #include <unordered_map> #include <unordered_set> #include <comple...
a.cc: In member function 'matrix<T>& matrix<T>::operator+=(const matrix<T>&)': a.cc:209:26: error: 'a' was not declared in this scope 209 | if (s != a.s)throw runtime_error("matrix error"); | ^ a.cc:211:72: error: 'a' was not declared in this scope 211 | ...
s644163787
p01529
C++
#include <bits/stdc++.h> using namespace std; #define DUMP(x) cerr << #x << "=" << x << endl #define DUMP2(x, y) cerr<<"("<<#x<<", "<<#y<<") = ("<<x<<", "<<y<<")"<< endl #define BINARY(x) static_cast<bitset<16> >(x) #define rep(i,n) for(int i=0;i<(int)(n);i++) #define REP(i,m,n) for (int i=(int)(m);i<(int)(n);i++) #...
a.cc:64:1: error: 'j' does not name a type 64 | j | ^
s132616449
p01529
C++
#include<iostream> #include<vector> #include<algorithm> #define INF (1LL<<61) using namespace std; typedef unsigned long long ull; int main(void){ int n; cin >> n; vector<ull> cost(n); for(int i=0;i<n;i++){ cin >> cost[i]; if(i>0)cost[i]+=cost[i-1]; } static ull dp[n][n],k[n][n]; fill(...
a.cc: In function 'int main()': a.cc:21:14: error: storage size of 'dp' isn't constant 21 | static ull dp[n][n],k[n][n]; | ^~ a.cc:21:23: error: storage size of 'k' isn't constant 21 | static ull dp[n][n],k[n][n]; | ^
s918998758
p01531
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] a) throws IOException { int a; String c; String str = new BufferedReader(new InputStreamReader(System.in)).readLine(); String result = ""; for(int i=0;i<str.leng...
Main.java:9: error: variable a is already defined in method main(String[]) int a; String c; ^ 1 error
s323019610
p01531
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] a) { int a; String c; String str = ""; try {str = new BufferedReader(new InputStreamReader(System.in)).readLine();} catch (IOException e) {e.printStackTrace();} ...
Main.java:9: error: variable a is already defined in method main(String[]) int a; String c; ^ 1 error
s925070663
p01531
C++
g#include <iostream> #include <cstdio> #include <string> #include <map> using namespace std; string s; void run() { map<char, char> boin; boin['T'] = 'a'; boin['L'] = 'i'; boin['U'] = 'u'; boin['R'] = 'e'; boin['D'] = 'o'; for (int i = 0; i < s.length(); i+=2) { int index = s[i]; ...
a.cc:1:2: error: stray '#' in program 1 | g#include <iostream> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <iostream> | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:3: /usr/include/...
s035343557
p01531
C++
#include <iostream> #include <sstream> #include <string> #include <vector> #include <iterator> using namespace std; int main() { string src = "wa * nn * wo a i u e o ka ki ku ke ko sa si su se so ta ti tu te to na ni nu ne no ha hi hu he ho ma mi mu me mo ya * yu * yo ra ri ru re ro"; istringstream iss(src); ...
a.cc: In function 'int main()': a.cc:25:22: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, char&)' 25 | int qs = find(begin(dir), end(dir), q) - begin(dir); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file in...
s106060297
p01531
C++
#include <iostream> int main() { char num,flick; int f; const char boin[5]={'a','i','u','e','o'}; while(std::cin>>num){ std::cin>>flick; switch(flick){ case 'T':f=0;break; case 'L':f=1;break; case 'U':f=2;break; case 'R':f=3;break; case 'D':f=4;break; } if(num=='0'){ const char wa[5][3]={"wa",0,"nn",0,"...
a.cc: In function 'int main()': a.cc:17:53: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 17 | const char wa[5][3]={"wa",0,"nn",0,"wo"}; | ^~~~ | | ...
s739490394
p01532
C
3 0 0 100 2 1 3 0 3 0
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 3 0 0 100 | ^
s972370015
p01532
C++
#include <iostream> #include <string> using namespace std; int main(){ int n; int T, H, L; int t[114514]; int h[114514]; int f = -1; cin >>n>>T>>H>>L; for (int i = 0; i < n; i++){ cin >> t[i] >> h[i]; } int zan = 0; while (f==-1){ for (int k = 0; k < n; k++){ if (t[k] != 0){ //10???????????£??????????...
a.cc: In function 'int main()': a.cc:36:54: error: expected ';' before '}' token 36 | zan=0 | ^ | ; 37 | } ...
s391328259
p01532
C++
#include<iostream> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<vector> #include<cmath> #include<cstring> #include<cstdio> #include<time.h> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #define mp make_pair #define all(in) in.b...
a.cc: In function 'int main()': a.cc:55:30: error: no match for 'operator+=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} and 'int') 55 | in[i]+=o;
s493776606
p01532
C++
#include <cstdio> int t[99],h[99],i,s,N,T,L;main(){for(scanf("%d%d%d%d",&N,&T,&L,&L),i=0;i<N;i++)scanf("%d%d",t+i,h+i);for(i=s=0;;i=(i+1)%N)if(t[i]){t[i]--;if(++T>L)break;if(++s==9)s=0;}else if(h[i]){h[i]--;if(T<++s)break;t[i]=s;T-=s;s=0;}else break;printf("%d\n",i+1);exit(0);}
a.cc:2:27: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int t[99],h[99],i,s,N,T,L;main(){for(scanf("%d%d%d%d",&N,&T,&L,&L),i=0;i<N;i++)scanf("%d%d",t+i,h+i);for(i=s=0;;i=(i+1)%N)if(t[i]){t[i]--;if(++T>L)break;if(++s==9)s=0;}else if(h[i]){h[i]--;if(T<++s)break;t[i]=s;T-=s;s=0;}else...
s198954996
p01532
C++
#include<iostream> main(){ &#160; int N,T,L,r,i; &#160; std::cin>>N>>T>>L>>L; &#160; int m[101],n[101]; &#160; for(i=0;i<N;i++)std::cin>>m[i]>>n[i]; &#160; i=r=0; &#160; while(1){ &#160; &#160; if(m[i]+n[i]==0)break; &#160; &#160; bool broken=false; &#160; &#160; if(m[i]){ &#160; &#160; &#160; m[i]--; &#160; &#160;...
a.cc:7:2: error: stray '#' in program 7 | &#160; int N,T,L,r,i; | ^ a.cc:8:2: error: stray '#' in program 8 | &#160; std::cin>>N>>T>>L>>L; | ^ a.cc:9:2: error: stray '#' in program 9 | &#160; int m[101],n[101]; | ^ a.cc:10:2: error: stray '#' in program 10 | &#160; for(i=0;i<N;i++)st...
s264354800
p01532
C++
#include<iostream> int N,T,L,r,i,m[101],n[101]; main(){ &#160; for(std::cin>>N>>T>>L>>L;i<N;)std::cin>>m[i]>>n[i++]; &#160; i=r=0; &#160; for(;m[i]+n[i];){ &#160; &#160; bool broken=false; &#160; &#160; if(m[i]){ &#160; &#160; &#160; m[i]--; &#160; &#160; &#160; r+=10; &#160; &#160; &#160; T++; &#160; &#160; }else{ &#1...
a.cc:4:2: error: stray '#' in program 4 | &#160; for(std::cin>>N>>T>>L>>L;i<N;)std::cin>>m[i]>>n[i++]; | ^ a.cc:5:2: error: stray '#' in program 5 | &#160; i=r=0; | ^ a.cc:6:2: error: stray '#' in program 6 | &#160; for(;m[i]+n[i];){ | ^ a.cc:7:2: error: stray '#' in program 7 | &#1...
s613237140
p01532
C++
N,T,L,i,m[101],n[101],r;main(){for(scanf("%d%d%d%d",&N,&T,&L,&L);i++<N;)scanf("%d%d",m+i,n+i);for(i=0;m[++i]+n[i];i%=N){if(m[i]){m[i]--;T++;r++;}else{n[i]--;r+=10;}if(T>L)break;if(r>8){T-=(r+1)%10;m[i]+=(r+1)%10;r=0;}if(T<0)break;}printf("%d\n",i);}
a.cc:1:1: error: 'N' does not name a type 1 | N,T,L,i,m[101],n[101],r;main(){for(scanf("%d%d%d%d",&N,&T,&L,&L);i++<N;)scanf("%d%d",m+i,n+i);for(i=0;m[++i]+n[i];i%=N){if(m[i]){m[i]--;T++;r++;}else{n[i]--;r+=10;}if(T>L)break;if(r>8){T-=(r+1)%10;m[i]+=(r+1)%10;r=0;}if(T<0)break;}printf("%d\n",i);} | ^ a.cc:1:25:...
s828506763
p01533
C++
#include <iostream> #include <complex> #include <sstream> #include <string> #include <algorithm> #include <deque> #include <list> #include <map> #include <numeric> #include <queue> #include <vector> #include <set> #include <limits> #include <cstdio> #include <cctype> #include <cmath> #include <cstring> #include <cstdli...
a.cc: In function 'int solve(std::vector<std::vector<int> >&, int, P&, std::vector<std::pair<int, int> >&, std::vector<std::vector<int> >&)': a.cc:59:7: error: 'bitset' was not declared in this scope 59 | bitset<4> bs(i); | ^~~~~~ a.cc:20:1: note: 'std::bitset' is defined in header '<bitset>'; this...
s317961944
p01534
C++
#include<bits/stdc++.h> using namespace std; #define INF 100100100 int main(){ int n, m; cin >> n >> m; int dp[55][10][55]; vector<int> A(n); vector<int> B(n); vector<int> C(n); for(int i = 0; i <= n; i++){ for(int j = 0; j <= 8; j++){ for(int k = 0; k <= m; k++){ ...
a.cc: In function 'int main()': a.cc:51:32: error: 'b' was not declared in this scope 51 | if(a + b != 0) value = max(value, A[i] * a + B[i] * j); | ^
s878819325
p01534
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> #include<algorithm> #include<cstring> #include<sstream> #include<vector> #include<queue> #include<stack> #include<string> #include<climits> #include<map> #include<climits> #include<set> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0...
a.cc: In function 'int main()': a.cc:57:21: error: 'xx' was not declared in this scope 57 | mex = max(xx,mex); | ^~
s420334668
p01535
C++
#error "tsurai" #include <cstdio> #include <cstdint> #include <cctype> #include <cassert> #include <algorithm> #include <vector> #include <map> template <intmax_t X=9436884629, intmax_t MOD=1000000007> class RollingHash { std::vector<intmax_t> hash_; intmax_t offset(size_t len) const { intmax_t res=1; for...
a.cc:1:2: error: #error "tsurai" 1 | #error "tsurai" | ^~~~~ a.cc:27:26: error: 'string' in namespace 'std' does not name a type 27 | RollingHash(const std::string &s): hash_(s.length()+1) { | ^~~~~~ a.cc:10:1: note: 'std::string' is defined in header '<string>'; this is p...
s789358692
p01535
C++
#error "t<b>sura</b>i"
a.cc:1:2: error: #error "t<b>sura</b>i" 1 | #error "t<b>sura</b>i" | ^~~~~
s615934496
p01535
C++
#error "<script>alert('XSS');</script>"
a.cc:1:2: error: #error "<script>alert('XSS');</script>" 1 | #error "<script>alert('XSS');</script>" | ^~~~~
s428403622
p01535
C++
#error "" // <script>alert("XSS");</script>
a.cc:1:2: error: #error "" 1 | #error "" // <script>alert("XSS");</script> | ^~~~~
s929532083
p01535
C++
#error "" // <script>console.log("XSS");</script>
a.cc:1:2: error: #error "" 1 | #error "" // <script>console.log("XSS");</script> | ^~~~~
s547318037
p01535
C++
#error "" // </div><script>alert("hoge");</script>fuga<div class="error">
a.cc:1:2: error: #error "" 1 | #error "" // </div><script>alert("hoge");</script>fuga<div class="error"> | ^~~~~
s009883193
p01535
C++
#error "" // <IMg SrC=JaVaScRiPt:alert('XSS')>
a.cc:1:2: error: #error "" 1 | #error "" // <IMg SrC=JaVaScRiPt:alert('XSS')> | ^~~~~
s572935884
p01535
C++
#error " " // a<b>c</b>
a.cc:1:2: error: #error " " 1 | #error " " // a<b>c</b> | ^~~~~
s911473319
p01537
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; const double eps = 1e-6; double max_r(const vector<int> &xs, const vector<int> &ys, double x, double y){ double r_max = 0; for(int i=0;i<xs.size();i++){ r_max = max(r_max, hypot(x - xs[i], y - ys[i])); } return r_max; }...
a.cc: In function 'bool greedy_check(int)': a.cc:73:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 73 | sort(rs.begin(), rs.end()); | ^~~~ | sqrt
s210113085
p01538
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:27: error: <identifier> expected pubilc static int dfs(int a){ ^ Main.java:37: error: illegal start of expression return dp[a]=dfs(ma)+1; ^ 2 errors
s973975269
p01538
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:27: error: <identifier> expected pubilc static int dfs(int a){ ^ 1 error
s479706086
p01538
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using CHY72; namespace CHY72{ public class PointXY{ public int X , Y; public int SQLength() { return X * X + Y * Y; } public bool Flag = false; public PointXY(int _X,int _Y) ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s086085264
p01538
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using CHY72; namespace CHY72{ public class PointXY{ public int X , Y; public int SQLength() { return X * X + Y * Y; } public bool Flag = false; public PointXY(int _X,int _Y) ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s143875713
p01538
C++
#include<stdio.h> int main(){ int n; scanf("%d",&n);if(n==0)break; int x; for(int i=0;i<n;i++) {scanf("%d",&x); int c=0;int d=10;int w=0,y=0;int max=0; while(x/10!=0){ for(int j=0;j<6;j++) { w=x/d;y=x%d;d*=10; if(j==0)max=w*y; else if(w*y>max)max=w*y;} x=max;c++;d=10;} printf("%d\n",c); }} return 0; }
a.cc: In function 'int main()': a.cc:7:24: error: break statement not within loop or switch 7 | scanf("%d",&n);if(n==0)break; | ^~~~~ a.cc: At global scope: a.cc:21:1: error: expected unqualified-id before 'return' 21 | return 0; | ^~~~~~ a.cc:22:1: error: expected declaration ...
s286782906
p01538
C++
#include<stdio.h> int main(){ int n; scanf("%d",&n);if(n==0)break; int x; for(int i=0;i<n;i++) {scanf("%d",&x); int c=0;int d=10;int w=0,y=0;int max=0; while(x/10!=0){ for(int j=0;j<6;j++) { w=x/d;y=x%d;d*=10; if(j==0)max=w*y; else if(w*y>max)max=w*y;} x=max;c++;d=10;} printf("%d\n",c); } return 0; }
a.cc: In function 'int main()': a.cc:7:24: error: break statement not within loop or switch 7 | scanf("%d",&n);if(n==0)break; | ^~~~~
s314012883
p01538
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<map> #include<algorithm> using namespace std; typedef long long int lli; lli tejun2(int s) { lli res=0; for(lli i=1; i<1e7; i*=10) res = max(res, (s%i)*(s/i)); return res; } int main(void) { int q; scanf("%d", &q); fo...
a.cc: In function 'int main()': a.cc:25:9: error: 'set' was not declared in this scope 25 | set<lli> hist; | ^~~ a.cc:6:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 5 | #include<algorithm> +++ |+#include <set> 6 | a.cc:25:16: e...
s083800824
p01538
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <sstream> using namespace std; int main(int argc, char *argv[]) { int q, cnt, tmp; string n; vector<int>::iterator itr; cin >> q; while (cin >> n, q--) { vector<int> cache; for (cnt = 0;; ++cnt) { ...
a.cc:39:9: error: stray '@' in program 39 | [taguchi@Ken | ^ a.cc:39:1: error: expected unqualified-id before '[' token 39 | [taguchi@Ken | ^
s558096443
p01538
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int q, n, m, i, j, a, b, d, cnt, max; cin >> q; for (i = 0; i < q; i++) { cnt = 0; cin >> n; while (n / 10 != 0) { d = 1; m = n; max = 0; while (m / 10 != 0) { m /= 10; d++; } for (j = 1; j <...
a.cc: In function 'int main()': a.cc:24:41: error: 'pow' was not declared in this scope 24 | a = n / pow(10, j); | ^~~
s312567531
p01538
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; inline int nextInt() { int d; cin >> d; return d; } bool isUsed[(int)1e6 + 1]; int getNext(int n) { int ret = -1; for (int d = 10; d < n; d *= 10) { int n1 = n % d; int n2 = (n - n1) / d; ret = max(ret, n1 * n2); } ...
a.cc: In function 'int solve(int)': a.cc:24:3: error: 'memset' was not declared in this scope 24 | memset(isUsed, false, (int)1e6 + 1); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> +++ |+#include <cst...
s177433636
p01538
C++
#include <string> #include <iostream> #include <map> #include <vector> using namespace std; int main() { // int a = std::stoi("123"); // int a {std::stoi("0123") }; // vector<int> in { 9, 99, 123 }; int n; cin >> n; vector<int> in; for (int i=0; i<n; ++i) { int v; cin >> v; in.push_back(...
a.cc: In function 'int main()': a.cc:21:23: error: no matching function for call to 'stoi(int&)' 21 | in.push_back( stoi(v) ); | ~~~~^~~ In file included from /usr/include/c++/14/string:54, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int...
s691470046
p01538
C++
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <stack> #include <queue> //ranker using namespace std; #define REPS(i, a, n) for (int i = (a); i < (n); ++i) #define R...
a.cc: In function 'void sort2vectors(std::vector<int>&, std::vector<int>&)': a.cc:69:9: error: 'iota' was not declared in this scope 69 | iota(p.begin(), p.end(), 0); | ^~~~ a.cc: In function 'int main()': a.cc:167:58: error: expected ')' before ';' token 167 | int t2 = stoi...
s685602088
p01538
C++
#include <iostream> #include <math.h> #include <vector> using namespace std; int size (int n) { int s = 0; for (int j = 0;; j++) { if (n == 0) { s = 1; break; } else if ((pow(10, j)) <= n and n < (pow(10, j + 1))) { s++; break; } ...
a.cc: In function 'int main()': a.cc:37:18: error: 'max_element' was not declared in this scope 37 | n = *max_element(v.begin(), v.end()); | ^~~~~~~~~~~
s514993651
p01538
C++
#include <iostream> #include <math.h> #include <vector> using namespace std; int size (int n) { int s = 0; for (int j = 0;; j++) { if (n == 0) { s = 1; break; } else if ((pow(10, j)) <= n and n < (pow(10, j + 1))) { s++; break; } ...
a.cc: In function 'int main()': a.cc:37:18: error: 'max_element' was not declared in this scope 37 | n = *max_element(v.begin(), v.end()); | ^~~~~~~~~~~
s992197862
p01538
C++
#include <iostream> #include <math.h> #include <vector> using namespace std; int size (int n) { int s = 0; for (int j = 0;; j++) { if (n == 0) { s = 1; break; } else if ((pow(10, j)) <= n and n < (pow(10, j + 1))) { s++; break; } ...
a.cc: In function 'int main()': a.cc:37:18: error: 'max_element' was not declared in this scope 37 | n = *max_element(v.begin(), v.end()); | ^~~~~~~~~~~
s810876064
p01538
C++
#include <iostream> #include <math.h> #include <vector> using namespace std; int size (int n) { int s = 0; for (int j = 0;; j++) { if (n == 0) { s = 1; break; } else if ((pow(10, j)) <= n and n < (pow(10, j + 1))) { s++; break; } ...
a.cc: In function 'int main()': a.cc:37:18: error: 'max_element' was not declared in this scope 37 | n = *max_element(v.begin(), v.end()); | ^~~~~~~~~~~
s026717681
p01538
C++
null
a.cc:1:1: error: 'null' does not name a type 1 | null | ^~~~
s958913800
p01539
C++
hozonnyou mada totyuu #include<iostream> #include<cstdio> #include<queue> #include<deque> #include<cmath> #include<vector> #include<cassert> #include<algorithm> #define F first #define S second #define pb push_back #define INF (1<<27) using namespace std; typedef pair<int,int> P; typedef pair<P,P> PP; P s,g,l; vecto...
a.cc:1:1: error: 'hozonnyou' does not name a type 1 | hozonnyou | ^~~~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from ...
s266181520
p01539
C++
ギビヤック
a.cc:1:1: error: '\U000030ae\U000030d3\U000030e4\U000030c3\U000030af' does not name a type 1 | ギビヤック | ^~~~~~~~~~
s924017993
p01540
C++
#include <bits/stdc++.h> using namespace std; int A[10010][2]; int S[10010][10010]; int N, M, x1, y1, x2, y2, xn, yn, ans; int ANS = 0; int *R; int Xs[10010], Ys[10010]; map<int,int> zipx, zipy; int unzipx[10010], unzipy[10010]; int MAX = 1000000001; int compress(int *X, map<int, int> &zip, int *unzip, int n) { so...
a.cc:5:15: error: 'int y1' redeclared as different kind of entity 5 | int N, M, x1, y1, x2, y2, xn, yn, ans; | ^~ 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-gn...
s396924869
p01540
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define all(vec) vec.begin(),vec.end() int main(){ int n,m;cin >> n >> m; vector<int> index_of_x(n),index_of_y(n); for(int i=0;i<n;i++){ cin >> index_of_x[i] >> index_of_y[i]; } vector<int> value_of_x = index_...
a.cc: In function 'int main()': a.cc:30:5: error: 'v' was not declared in this scope 30 | v = calc_sum(p); | ^ a.cc:30:9: error: 'calc_sum' was not declared in this scope 30 | v = calc_sum(p); | ^~~~~~~~