submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s446875114
p00332
C++
#include <bits/stdc++.h> using namespace std; class data { int p[5]={1868,1912,1926,1989,2017}; char c[4]={'M','T','S','H'}; }; int main() { int E, Y; cin >> E >> Y; data d; if (E==0) { int idx; for (int i=0; i<4; i++) { if (d.p[i]<=Y && Y<d.p[i+1]) { idx = i; break; } ...
a.cc: In function 'int main()': a.cc:11:3: error: reference to 'data' is ambiguous 11 | data d; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from...
s929828330
p00332
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,tosi; cin>>a>>b; if(a == 0){ if(b >= 1868&&b <= 1911){ tosi = b - 1869; cout >> "M" >> tosi >> endl; }else if(b >= 1912&&b <= 1925){ tosi = b - 1913; cout >> "T" >> tosi >> endl; }else if(b ...
a.cc: In function 'int main()': a.cc:10:15: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]') 10 | cout >> "M" >> tosi >> endl; | ~~~~ ^~ ~~~ | | | | | const char [2] | ...
s172846371
p00332
C++
#include<bits/stdc++.h> using namespace std; int main(){ int E,Y; cin>>E>>Y; if(E==0){ if(Y>=1989&&Y<=2016)cout<<"H"<<Y-1988<<endl; if(Y>=1926&&Y<=1988)cout<<"S"<<Y-1925<<endl; if(Y>=1912&&Y<=1925)cout<<"T"<<Y-1911<<endl; if(Y>=1868&&Y<=1911)cout<<"M"<<Y-1867<<endl; } else{ if(E=1)cout<<Y+1867<<endl;} else{ if(...
a.cc: In function 'int main()': a.cc:22:1: error: 'else' without a previous 'if' 22 | else{ | ^~~~ a.cc:24:1: error: 'else' without a previous 'if' 24 | else{ | ^~~~ a.cc:26:1: error: 'else' without a previous 'if' 26 | else{ | ^~~~
s040464665
p00333
Java
import math W,H,C = map(int,input().split(' ')) x = ma.gcd(thW,H) print((W//x)*(H//x)*C)
Main.java:1: error: '.' expected import math ^ Main.java:3: error: ';' expected W,H,C = map(int,input().split(' ')) ^ 2 errors
s224631155
p00333
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int W = s.nextInt(); int H = s.nextInt(); int C = s.nextInt(); int a = 0; int b = 0; int c = 0; int x = 0; if(W>H){ a = W; b = H; }else{ a = H; b = W; } ...
Main.java:36: error: cannot find symbol System.out.printl(W/x * H/x * C); ^ symbol: method printl(int) location: variable out of type PrintStream 1 error
s785479453
p00333
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int W = s.nextInt(); int H = s.nextInt(); int C = s.nextInt(); int a = 0; int b = 0; int c = 0; int x = 0; if(W>H){ a = W; b = H; }else{ a = H; b = W; } ...
Main.java:43: error: class, interface, enum, or record expected } ^ 1 error
s800683609
p00333
C
#include<stdio.h> int func(int a,int b) { int r; r = a % b;     while (r > 0) {       a = b;       b = r;       r = a % b;     }     return b; } int main() { int w,h,c; int s; scanf("%d %d %d",&w,&h,&c); s = func( w,h ); h /= s; w /= s; printf("%d\n",h*w*c); ...
main.c: In function 'func': main.c:7:1: error: stray '\343' in program 7 | <U+3000><U+3000><U+3000><U+3000>while (r > 0) { | ^~~~~~~~ main.c:7:3: error: stray '\343' in program 7 | <U+3000><U+3000><U+3000><U+3000>while (r > 0) { | ^~~~~~~~ main.c:7:5: error: stray '\343' in program 7 | <...
s016606390
p00333
C
#include<stdio.h> int func(int a,int b) { int r; r = a % b;   while (r > 0)     {       a = b;       b = r;       r = a % b;     }   return b; } int main() { int w,h,c; int s; scanf("%d %d %d",&w,&h,&c); s = func( w,h ); h /= s; w /= s; printf("%d\n",h*w*c); ...
main.c: In function 'func': main.c:7:1: error: stray '\343' in program 7 | <U+3000><U+3000>while (r > 0) | ^~~~~~~~ main.c:7:3: error: stray '\343' in program 7 | <U+3000><U+3000>while (r > 0) | ^~~~~~~~ main.c:8:1: error: stray '\343' in program 8 | <U+3000><U+3000><U+3000><U+3000>{ ...
s716770652
p00333
C
#include<stdio.h> int func(int,int); int main() { int w,h,c; int s; scanf("%d %d %d",&w,&h,&c); s = func( w,h ); h /= s; w /= s; printf("%d\n",h*w*c); return 0; } int func(int a,int b) { int r; r = a % b;   while (r > 0)     {       a = b;       b = r;      ...
main.c: In function 'func': main.c:24:1: error: stray '\343' in program 24 | <U+3000><U+3000>while (r > 0) | ^~~~~~~~ main.c:24:3: error: stray '\343' in program 24 | <U+3000><U+3000>while (r > 0) | ^~~~~~~~ main.c:25:1: error: stray '\343' in program 25 | <U+3000><U+3000><U+3000><U+3000>{ ...
s090555406
p00333
C
#include<stdio.h> int func(int,int); int main() { int w,h,c; int s; scanf("%d %d %d",&w,&h,&c); s = func( w,h ); h /= s; w /= s; printf("%d\n",h*w*c); return 0; } int func(int a,int b) { int r; r = a % b;   while (r > 0)   { a = b; b = r; ...
main.c: In function 'func': main.c:24:1: error: stray '\343' in program 24 | <U+3000><U+3000>while (r > 0) | ^~~~~~~~ main.c:24:3: error: stray '\343' in program 24 | <U+3000><U+3000>while (r > 0) | ^~~~~~~~ main.c:25:1: error: stray '\343' in program 25 | <U+3000><U+3000>{ | ^~~~~~~~...
s152147460
p00333
C
#include<stdio.h> int func(int,int); int main() { int w,h,c; int s; scanf("%d %d %d",&w,&h,&c); s = func( w,h ); h /= s; w /= s; printf("%d\n",h*w*c); return 0; } int func(int a,int b) { int r; r = a % b;   while(r>0)   {    a = b;    b = r;    r = ...
main.c: In function 'func': main.c:24:1: error: stray '\343' in program 24 | <U+3000><U+3000>while(r>0) | ^~~~~~~~ main.c:24:3: error: stray '\343' in program 24 | <U+3000><U+3000>while(r>0) | ^~~~~~~~ main.c:25:1: error: stray '\343' in program 25 | <U+3000><U+3000>{ | ^~~~~~~~ main....
s452195456
p00333
C
#include<stdio.h> int lcm(int,int); int main(){ int w,h,c,a,b; scanf("%d%d%d",&w,&h,&c); if(w>h){ a=lcm(w,h); } else if(w=h){ a=w; } else[ a=lcm(h,w); } b=(w/a)*(h/a)*c; printf("%d",b); return 0; } int lcm(int x,int y){ int z; while(x%y!=0){ z=x%y; x=y; y=z; } return y; }
main.c: In function 'main': main.c:12:6: error: expected expression before '[' token 12 | else[ | ^ main.c:13:14: error: expected ';' before '}' token 13 | a=lcm(h,w); | ^ | ; 14 | } | ~ main.c: At top level: main.c:15:2: warning: data def...
s156431283
p00333
C
#include<stdio.h> int lcm(int,int); int main(){ int w,h,c,a,e,f; scanf("%d%d%d",&w,&h,&c); if(w>h){ a=lcm(w,h); } else if(w=h){ a=w; } else{ a=lcm(h,w); } e=w/a; f=h/a; b=c*e*f; printf("%d",b); return 0; } int lcm(int x,int y){ int z; while(x%y!=0){ z=x%y; x=y; y=z; } return y; }
main.c: In function 'main': main.c:17:2: error: 'b' undeclared (first use in this function) 17 | b=c*e*f; | ^ main.c:17:2: note: each undeclared identifier is reported only once for each function it appears in
s657953819
p00333
C
#include<stdio.h> int gcd(int,int); int main(){ int w,h,a,b,c,d; scanf("%d%d%d",&w,&h,&c); if(w>h){ a=gcd(w,h); else if(w==h){ a=w; } else{ a=gcm(h,w); } b=w*h*c; d=b/a; printf("%d",d/a); return(0); } int gcd(int p,int q){ int r; r=p%q; while(r!=0){ p=q; q=r; r=p%q; } return q; }
main.c: In function 'main': main.c:8:2: error: expected '}' before 'else' 8 | else if(w==h){ | ^~~~ main.c:12:5: error: implicit declaration of function 'gcm'; did you mean 'gcd'? [-Wimplicit-function-declaration] 12 | a=gcm(h,w); | ^~~ | gcd
s320906063
p00333
C
#include<stdio.h> int gcd(int,int); int main(void) { int a,b,c,d,h,w; scanf("%d%d%d",&w,%h,&c); if(w>h){ a=gcm(w,h); } else if(w==h){ a=w; } else{ a=gcm(h,w); } b=w/a; d=h/a; printf("%d",b*c*d); return(0); } int gcd(int p,int q) { int r; r=p%q; while(r!=0){ p=q; q=r; r=p%q; } return q; }
main.c: In function 'main': main.c:6:20: error: expected expression before '%' token 6 | scanf("%d%d%d",&w,%h,&c); | ^ main.c:8:5: error: implicit declaration of function 'gcm'; did you mean 'gcd'? [-Wimplicit-function-declaration] 8 | a=gcm(w,h); | ^~~ | gcd
s150293562
p00333
C
#include<stdio.h> int gcd(int,int); int main(void) { int a,b,c,d,h,w; scanf("%d%d%d",&w,&h,&c); if(w>h){ a=gcm(w,h); } else if(w==h){ a=w; } else{ a=gcm(h,w); } b=w/a; d=h/a; printf("%d",b*c*d); return(0); } int gcd(int p,int q) { int r; r=p%q; while(r!=0){ p=q; q=r; r=p%q; } return q; }
main.c: In function 'main': main.c:8:5: error: implicit declaration of function 'gcm'; did you mean 'gcd'? [-Wimplicit-function-declaration] 8 | a=gcm(w,h); | ^~~ | gcd
s208207799
p00333
C
#include<stdio.h> int gcd(int p,int q) { int r; r=p%q; while(r!=0){ p=q; q=r; r=p%q; } return q; } int main(void) { int a,b,c,d,h,w; scanf("%d%d%d",&w,&h,&c); if(w>h){ a=gcm(w,h); } else if(w==h){ a=w; } else{ a=gcm(h,w); } b=w/a; d=h/a; printf("%d",b*c*d); return(0); }
main.c: In function 'main': main.c:20:5: error: implicit declaration of function 'gcm'; did you mean 'gcd'? [-Wimplicit-function-declaration] 20 | a=gcm(w,h); | ^~~ | gcd
s533057685
p00333
C++
#include<iostream> using namespace std; int gcd(){ if(n==0) return m; return gcd(n, m%n); } int main(){ int W,H,C; cin >> W > H >> C; int g = gcd(W, H); cout << W/g*H/g*C << endl; return 0; }
a.cc: In function 'int gcd()': a.cc:5:6: error: 'n' was not declared in this scope 5 | if(n==0) | ^ a.cc:6:12: error: 'm' was not declared in this scope; did you mean 'tm'? 6 | return m; | ^ | tm a.cc:7:14: error: 'n' was not declared in this scope 7 | re...
s157217641
p00333
C++
#include<iostream> using namespace std; int gcd(){ if(n==0) return m; return gcd(n, m%n); } int main(){ int W,H,C; cin >> W >> H >> C; int g = gcd(W, H); cout << W/g*H/g*C << endl; return 0; }
a.cc: In function 'int gcd()': a.cc:5:6: error: 'n' was not declared in this scope 5 | if(n==0) | ^ a.cc:6:12: error: 'm' was not declared in this scope; did you mean 'tm'? 6 | return m; | ^ | tm a.cc:7:14: error: 'n' was not declared in this scope 7 | re...
s775712956
p00333
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int maxi(int x,int y){ if(y==0 || x==y) return x; else if(x==1 || y==1) return 1; else if(x>y) return maxi(y,x%y); else return maxi(x,y%x); } int pow(int x) return x*x; int main(){ int w,h,c; cin >> w >> h >> c; cout << (...
a.cc: In function 'int pow(int)': a.cc:14:16: error: named return values are no longer supported 14 | int pow(int x) return x*x; | ^~~~~~ a.cc:20:41: error: expected ';' before 'return' 20 | cout << (w*h/pow(maxi(w,h)))*c << endl | ^ | ...
s895826525
p00333
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int maxi(int x,int y){ if(y==0 || x==y) return x; else if(x==1 || y==1) return 1; else if(x>y) return maxi(y,x%y); else return maxi(x,y%x); } int powx(int x) return x*x; int main(){ int w,h,c; cin >> w >> h >> c; cout << ...
a.cc: In function 'int powx(int)': a.cc:14:17: error: named return values are no longer supported 14 | int powx(int x) return x*x; | ^~~~~~
s143165768
p00333
C++
#include<bits/std++.h> using namespace std; int main(){ int w,h,c; int sum = 0; cin >> w >> h >> c; while(w==0 || h==0){ if(w>h){ w = w-h; sum = sum+c; } if(h>w){ h = h-w; sum = sum+c; } if(h==w){ h=h-w; sum = sum+c; } } cout << sum <<endl; }
a.cc:1:9: fatal error: bits/std++.h: No such file or directory 1 | #include<bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s184921332
p00333
C++
#include <bits/stdc++.h> using namespace std; int main(){ int W,H,C,X; cin>>W>>H>>C; if((W*H)%(X*X)==0){ cout<<C*X*X<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:4: error: expected '}' at end of input 13 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s271293922
p00333
C++
#include<bits/stdc++.h> using namespace std; int main(){ int w,h,c,i,num; int sum = 0; cin >> w >> h >> c; if(h == w) cout << c << endl; while(1){ if(w>h){ if(w%h == 0){ num = h; break; } w = w%h; } if(h>w){ if(h%w == 0){ num =w; break; } h = h%w; } cout << ((h*w...
a.cc: In function 'int main()': a.cc:25:2: error: expected '}' at end of input 25 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s857148058
p00333
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,e; cin>>a>>b>>c; d=__gcd(a,b); cout<<(a/d)*(b/d)*c<<endl; }
a.cc: In function 'int main()': a.cc:6:5: error: '__gcd' was not declared in this scope 6 | d=__gcd(a,b); | ^~~~~
s415775798
p00333
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int W,H,C; cin>>W>>H>>C; int squares=gcd(W,H); cout<<square*C<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: 'gcd' was not declared in this scope 9 | int squares=gcd(W,H); | ^~~ a.cc:10:9: error: 'square' was not declared in this scope; did you mean 'squares'? 10 | cout<<square*C<<endl; | ^~~~~~ | squares
s932816093
p00333
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int W,H,C; cin>>W>>H>>C; int squares=gcd(W,H); cout<<square*C<<endl; #include <iostream> #include <algorithm> using namespace std; int gcd( int m, int n ) { // ?????°?????????????????´?????????????????? if ( ( 0 == m ) || ( 0 == n ...
a.cc: In function 'int main()': a.cc:9:15: error: 'gcd' was not declared in this scope 9 | int squares=gcd(W,H); | ^~~ a.cc:10:9: error: 'square' was not declared in this scope; did you mean 'squares'? 10 | cout<<square*C<<endl; | ^~~~~~ | squares a.cc:16:1: er...
s162699201
p00333
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int W,H,C; cin>>W>>H>>C; int squares=gcd(W,H); cout<<square*C<<endl; #include <iostream> #include <algorithm> using namespace std; int gcd( int m, int n ) { // ?????°?????????????????´?????????????????? if ( ( 0 == m ) || ( 0 == n ...
a.cc: In function 'int main()': a.cc:9:15: error: 'gcd' was not declared in this scope 9 | int squares=gcd(W,H); | ^~~ a.cc:10:9: error: 'square' was not declared in this scope; did you mean 'squares'? 10 | cout<<square*C<<endl; | ^~~~~~ | squares a.cc:16:1: er...
s913034480
p00333
C++
#include<iostream> using namespace std; int gcd(int m,int n) { if(n==0){ return m; } return gcd(n,m%n) } int main() { int W,H,C; cin>>W>>H>>C; int g=gcd(W,H); cout<<W/g*H/g*C<<endl; return 0; }
a.cc: In function 'int gcd(int, int)': a.cc:9:20: error: expected ';' before '}' token 9 | return gcd(n,m%n) | ^ | ; 10 | } | ~
s405112867
p00333
C++
#include<iostream> using namespace std; int gcd(int m,int n) { if(n==0){ return m; } return gcd(n,m%n) } int main() { int W,H,C; cin>>W>>H>>C; int g=gcd(W,H); cout<<W/g*H/g*C<<endl; return 0; }
a.cc: In function 'int gcd(int, int)': a.cc:9:20: error: expected ';' before '}' token 9 | return gcd(n,m%n) | ^ | ; 10 | } | ~
s521258542
p00333
C++
#include<iostream> using namespace std; int main(void){ int w,h,c; cin>>w; cin>>h; int a=w; int b=h; while(a%b!=0){ int d=a%b a=b; b=d; } int e=w/b; int f=h/b; int g=e*f*c; cout<<c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:4: error: expected ',' or ';' before 'a' 11 | a=b; | ^
s985773738
p00333
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s472190959
p00333
C++
#include <bits/stdc++.h> using namespace std; //#define int long long #define FOR(i, j, k) for(int i = j; i < (int)k; ++i) #define rep(i, j) FOR(i, 0, j) #define INF (1 << 30) typedef unsigned long long ull; typedef pair<int, int> P; typedef pair<P, int> Pi; const int MOD = 1e9 + 7; const int dy[] = {0, 0, 1, -1}...
a.cc: In function 'int main()': a.cc:30:39: error: 'c2' was not declared in this scope; did you mean 'c'? 30 | cout << ((w * h) / (tmp * tmp)) * c2 << endl; | ^~ | c
s629640934
p00333
C++
#include <iostream> using namespace std; int main () { int a[2],z,p = 0,pp = 0,q = 0; cin >> a[0] >> a[1] >> z; sort (a,a + 2); for (int i = a[1]; i > 0; i--) { for (int j = 1; j < 100; j++) { for (int k = 1; k < 100; k++) { if (i * j == a[0] && i * k == a[1]) { p = j; pp = k; q...
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort (a,a + 2); | ^~~~ | short
s506126377
p00333
C++
#include<bits/stdc++.h> using namespace std; int main(){ int W,H,C,cost; cin>>W>>H>>C; if(W==H)cost=C; if(W>H){ for(int i=W;i>0;i--){ if(W%i==0){ if(H%i==0){ cost=((W/i)*(H/i))*C; break; }}} cout<<C<<endl; return 0; }
a.cc: In function 'int main()': a.cc:25:2: error: expected '}' at end of input 25 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s395227515
p00333
C++
#include<bits/stdc++.h> using namespace std; int main(){ int W,H,C,cost; cin>>W>>H>>C; if(W==H)cost=C; if(W>H){ for(int i=W;i>0;i--){ if(W%i==0){ if(H%i==0){ cost=((W/i)*(H/i))*C; break;} } cout<<C<<endl; return 0; }
a.cc: In function 'int main()': a.cc:25:2: error: expected '}' at end of input 25 | } | ^ a.cc:13:8: note: to match this '{' 13 | if(W>H){ | ^ a.cc:25:2: error: expected '}' at end of input 25 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s741739877
p00333
C++
#include<bits/stdc++.h> using namespace std; int main(){ int W,H,C,cost; cin>>W>>H>>C; if(W==H)cost=C; if(W>H){ for(int i=W;i>0;i--){ if(W%i==0){ if(H%i==0){ cost=((W/i)*(H/i))*C; break;} } cout<<C<<endl; return 0; }
a.cc: In function 'int main()': a.cc:25:2: error: expected '}' at end of input 25 | } | ^ a.cc:13:8: note: to match this '{' 13 | if(W>H){ | ^ a.cc:25:2: error: expected '}' at end of input 25 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s588280716
p00333
C++
#include <bits/stdc++.h> using namespace std; int main(){ int W,H,C,A,B; cin >> W >> H >> C; A = 1; if(W = H){W = A} if(W > H){ for(int i =2; i<=H;i++)if(W % i == 0) A = i;} if(H > W){ for(int i=2;i<=W;i++)if(H % i == 0) A = i;} B = (W / A) * (H / A) * C; cout << B << endl; }
a.cc: In function 'int main()': a.cc:11:16: error: expected ';' before '}' token 11 | if(W = H){W = A} | ^ | ;
s047100213
p00333
C++
import fractions A, B, C = [int(k) for k in raw_input().split(' ')] print(C * ((A * B)/ (fractions.gcd(A, B) ** 2 )))
a.cc:1:1: error: 'import' does not name a type 1 | import fractions | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s794141525
p00333
C++
#include<iostream> using namespace std; int gcd(int a,int b){ while(a && b){ if(a<b)b %= a; else a %= b } return max(a,b); } int main(){ int w,h,c; cin>>w>>h>>c; cout<<w*h/gcd(w,h)/gcd(w,h)*c<<endl; return 0; }
a.cc: In function 'int gcd(int, int)': a.cc:7:20: error: expected ';' before '}' token 7 | else a %= b | ^ | ; 8 | } | ~
s781123355
p00333
C++
#include <iostream> using namespace std; int gcd(int m,int n){ if(n==0)return m; return gcd(n,m%n); } int main(){ int W,H,C; cin >> W >> H >> C; int g = gcd(W,H); cout << W*G*C/(g*g) << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:19: error: 'G' was not declared in this scope 16 | cout << W*G*C/(g*g) << endl; | ^
s288266194
p00333
C++
#include<bits/stdc++.h> using namespace std; int main(){ int H,H,C;cin>>W>>H>>C; int sum,cube; int ans; sum = W*H; for(int i = 0; i < 10000;i++){ if(sum % i ==0){ cube = i; break; } } ans = cube * C; std::cout << ans << std::endl; }
a.cc: In function 'int main()': a.cc:5:8: error: redeclaration of 'int H' 5 | int H,H,C;cin>>W>>H>>C; | ^ a.cc:5:6: note: 'int H' previously declared here 5 | int H,H,C;cin>>W>>H>>C; | ^ a.cc:5:17: error: 'W' was not declared in this scope 5 | int H,H,C;cin>>W>>H>>C; | ...
s434972619
p00334
C
#include<stdio.h> int main(void){ while(1){ int n,p[1000][1000][1000]={0},i,o=0,j[3],r,f; scanf("%d",&n); if(n==0){ break; } for(i=0;i<n;i++){ scanf("%d%d%d",&j[0],&j[1],&j[2]); for(r=0;r<3;r++){ for(e=r+1;e<3;e++){ if(j[r]>j[e]) f=j[r]; j[r]=j[e]; j[e]=f; } } if(p[...
main.c: In function 'main': main.c:12:37: error: 'e' undeclared (first use in this function) 12 | for(e=r+1;e<3;e++){ | ^ main.c:12:37: note: each undeclared identifier is reported only once for each function it appears in
s737038334
p00334
C
#include<stdio.h> int main(void) { int n,a,i,b; b=0; scanf("%d",&n); int p[4][n] for(i=0;i<n;i++){ scanf("%d %d %d",&p[0][i],&p[1][i],&p[2][i]); if(p[0][i]<p[1][i]){ a=p[0][i]; p[0][i]=p[1][i]; p[1][i]=a; } if(p[0][i]<p[2][i]){ a=p[0][i]; p[0][i]=p[2][i]; p[2][i]=a; } if(p[1][i]<p[2][...
main.c: In function 'main': main.c:8:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for' 8 | for(i=0;i<n;i++){ | ^~~ main.c:9:21: error: 'p' undeclared (first use in this function) 9 | scanf("%d %d %d",&p[0][i],&p[1][i],&p[2][i]); | ^ main.c:9:21: note: ea...
s189306444
p00334
C
#include <stdio.h> void swap(int *x, int *y){ int temp = *x; *x = *y; *y = temp; } int main(void) { int n, i, j, h = 0; int a[128]; scanf("%d", &n); n *= 3; for(i = 0; i < n; i += 3) scanf("%d %d %d", &a[i], &a[i + 1], &a[i + 2]); for(i = 0; i < n; i += 3) { i...
main.c: In function 'main': main.c:33:25: error: expected ';' before ':' token 33 | a[j] = 0: | ^ | ;
s371162968
p00334
C
#include<stdio.h> #define emt 1000 + 1 bool check[ emt ][ emt ][ emt ] ; int ans ; int min( int a ,int b ) { return a > b ? b : a ; } int max( int a ,int b ) { return a > b ? a : b ; } int main() { int n ; scanf( "%d" ,&n ) ; int a ,b ,c ; int i ; for( i = 0 ; i < n ; ++i ) { scanf( "%d %d %...
main.c:8:1: error: unknown type name 'bool' 8 | bool check[ emt ][ emt ][ emt ] ; | ^~~~ main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include<stdio.h> +++ |+#include <stdbool.h> 2 | main.c: In function 'main': main.c:50:...
s496533909
p00334
C
#include<stdio.h> #define emt 1000 + 1 bool check[ emt ][ emt ][ emt ] ; int ans ; int min( int a ,int b ) { return a > b ? b : a ; } int max( int a ,int b ) { return a > b ? a : b ; } int main() { int n ; scanf( "%d" ,&n ) ; int a ,b ,c ; int aa ,bb ,cc ; int i ; for( i = 0 ; i < n ; ++i ) {...
main.c:7:1: error: unknown type name 'bool' 7 | bool check[ emt ][ emt ][ emt ] ; | ^~~~ main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include<stdio.h> +++ |+#include <stdbool.h> 2 | main.c: In function 'main': main.c:51:...
s765014150
p00334
C++
#include <iostream> #include <algorithm> #include <map> using namespace std; int main(){ map<int, bool> memo; int N; cin>>N; for(int i=0;i<N;i++){ int p[3]; cin>>p[0]>>p[1]>>p[2]; sort(p,p+3); int k=((p[0]-1)*1000+(p[1]-1))*1000+(p[2]-1); if(memo.find(k)!=memo.end()){ cnt++; }else...
a.cc: In function 'int main()': a.cc:16:7: error: 'cnt' was not declared in this scope; did you mean 'int'? 16 | cnt++; | ^~~ | int a.cc:21:9: error: 'cnt' was not declared in this scope; did you mean 'int'? 21 | cout<<cnt<<endll | ^~~ | int a.cc:21:14: ...
s790366637
p00334
C++
#include <iostream> #include <algorithm> #include <map> using namespace std; int main(){ map<int, bool> memo; int N; cin>>N; for(int i=0;i<N;i++){ int p[3]; cin>>p[0]>>p[1]>>p[2]; sort(p,p+3); int k=((p[0]-1)*1000+(p[1]-1))*1000+(p[2]-1); if(memo.find(k)!=memo.end()){ cnt++; }else...
a.cc: In function 'int main()': a.cc:16:7: error: 'cnt' was not declared in this scope; did you mean 'int'? 16 | cnt++; | ^~~ | int a.cc:21:9: error: 'cnt' was not declared in this scope; did you mean 'int'? 21 | cout<<cnt<<endl; | ^~~ | int
s824886398
p00334
C++
#include <iostream> #include <algorithm> #include <map> using namespace std; int main(){ map<int,bool> memo; int N; cin >> N; int cnt=0; for(int i=0;i<N;i++){ int p[3]; cin >> p[0] >> p[1] >> p[2]; sort(p,p+3); int k=((p[0]-1)*1000+(p[1]-1))*1000+(p[2]-1); if(memo.find(k)){ cn...
a.cc: In function 'int main()': a.cc:22:17: error: could not convert 'memo.std::map<int, bool>::find(k)' from 'std::map<int, bool>::iterator' {aka 'std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator'} to 'b...
s164495873
p00334
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int F_get(){ int temp; cin >> temp; return temp; } int main() { int n; cin >> n; vector<vector<int>> v(n); for (int i = 0; i < 3 * n; i++) v[(int)(i / 3)].insert(F_get()); for (int i = 0; i < n; i++) sort(v[i].begin(), v[i].end()); ...
a.cc: In function 'int main()': a.cc:13:63: error: no matching function for call to 'std::vector<int>::insert(int)' 13 | for (int i = 0; i < 3 * n; i++) v[(int)(i / 3)].insert(F_get()); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/v...
s497385140
p00334
C++
#include<iostream> using namespace std; main(){ int n,i,i2,ans=0; cin >> n; int p[n*3],s[n],b[n],m[n]; for (i=1;1<=n;i++) cin >> p[i*3-2] >> p[i*3-1] >> p[i*3]; for (i=1;1<=n;i++) { if (p[i*3]<=p[i*3-2] && p[i*3]==p[i2*3-1]) { s[n]=p[i*3]; if (p[i*3-2]<=p[i*3-1]) ...
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:13:30: error: expected ';' before 'b' 13 | m[n]=p[i*3-2] | ^ | ; 14 | ...
s854387887
p00334
C++
#include<iostream> using namespace std; main(){ int n,i,i2,ans=0; cin >> n; int p[n*3],s[n],b[n],m[n]; for (i=1;1<=n;i++) cin >> p[i*3-2] >> p[i*3-1] >> p[i*3]; for (i=1;1<=n;i++) { if (p[i*3]<=p[i*3-2] && p[i*3]==p[i2*3-1]) { s[n]=p[i*3]; if (p[i*3-2]<=p[i*3-1]){ ...
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:46:65: error: expected ';' before '}' token 46 | if (s[i]==s[i2] && m[i]==m[i2] && b[i]==b[i2]) ans++ | ...
s902641308
p00334
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ int n; cin << n; int p[1005][3]={}; int x[1005]; for(int i=0;i<n;++i){ for(int j=0;j<3;++j) cin >> p[i][j]; sort(p[i].begin(),p[i].end()); x[i]=100*p[i][0]+10*p[i][1]+p[i][2]; } sort(x[i].begin(...
a.cc: In function 'int main()': a.cc:10:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 10 | cin << n; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:10:7: note: candidate: 'oper...
s771114582
p00334
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ int n; cin >> n; int p[1005][3]={}; int x[1005]; for(int i=0;i<n;++i){ for(int j=0;j<3;++j) cin >> p[i][j]; sort(p[i].begin(),p[i].end()); x[i]=100*p[i][0]+10*p[i][1]+p[i][2]; } sort(x[i].begin(...
a.cc: In function 'int main()': a.cc:16:15: error: request for member 'begin' in 'p[i]', which is of non-class type 'int [3]' 16 | sort(p[i].begin(),p[i].end()); | ^~~~~ a.cc:16:28: error: request for member 'end' in 'p[i]', which is of non-class type 'int [3]' 16 | sort(p[i].begin(),p...
s671006773
p00334
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ int n; cin >> n; vector<vector<int>> p(n,vector<int> (3,0)); vector<int> x(n); for(int i=0;i<n;++i){ for(int j=0;j<3;++j) cin >> p[i][j]; sort(p[i].begin(),p[i].end()); x[i]=100*p[i][0]+10*p[i][1]+p[i...
a.cc: In function 'int main()': a.cc:20:10: error: 'i' was not declared in this scope 20 | sort(x[i].begin(),x[i].end()); | ^
s251721445
p00334
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; int a, b, c; vector<int> x; vector<vector<int> > y; for(int i = 0; i < n; i++) { cin >> a >> b >> c; x.push_back(a); x.push_back(b); x.push_back(c); sort(x.begin(), x.end()); y.push_back...
a.cc: In function 'int main()': a.cc:17:12: error: no matching function for call to 'std::vector<std::vector<int> >::erase(__gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >, <unresolved overloaded function type>)' 17 | y.erase(unique(y.begin(), y.end()), y.end); | ~~~~~~~...
s616284457
p00334
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; int a, b, c; vector<int> x; vector<vector<int> > y; for(int i = 0; i < n; i++) { cin >> a >> b >> c; x.push_back(a); x.push_back(b); x.push_back(c); sort(x.begin(), x.end()); y.push_back...
a.cc: In function 'int main()': a.cc:17:12: error: no matching function for call to 'std::vector<std::vector<int> >::erase(__gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >, <unresolved overloaded function type>)' 17 | y.erase(unique(y.begin(), y.end()), y.end); | ~~~~~~~...
s311592667
p00334
C++
#include <iostream> #include <algorihm> using namespace std; int main() { int N; cin>>N; int p[N][3]; for(int i=0; i<N; i++){ cin>>p[i][0]>>p[i][1]>>p[i][2]; sort(p[i][0],p[i][2]); for(int j=0; j<i; j++){ if(p[j][0]==p[i][0] && p[j][1]==p[i][1] && p[j][2]==p[i][2]) } } }
a.cc:2:10: fatal error: algorihm: No such file or directory 2 | #include <algorihm> | ^~~~~~~~~~ compilation terminated.
s407785337
p00334
C++
#include<iostream> #include<algorithm> #include<map> using namespace std; main(){ map<int,bool>memo; int n; cin>>n; int cnt=0; for(int i=0;i<n;i++){ int p[3]; cin>>p[0]>>p[1]>>p[2]; sort(p,p+3); int k=((p[0]-1)*1000+(p[1]-1)*1000+(p[2]-1); if(memo.find(k)!=memo.end()){ cnt++; }else{ memo[k]=true...
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 8 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:21:52: error: expected ')' before ';' token 21 | int k=((p[0]-1)*1000+(p[1]-1)*1000+(p[2]-1); | ~ ^ ...
s173842729
p00334
C++
#include<iostream> #include<algorithm> #include<map> using namespace std; int main(){ map<int ,bool> memo; int N; cin>>N; int cnt=0; for(int i=0;i<N;i++){ int p[3]; cin>>p[0]>>p[1]>>p[2]; sort(p,p+3); int k=((p[0]-1)*1000+(p[1]-1))*1000+(p[2]-1); if(memo.find(k)!=memo.end()){ cnt++; }e...
a.cc: In function 'int main()': a.cc:31:9: error: 'cont' was not declared in this scope; did you mean 'cnt'? 31 | cont<<cnt<<endl; | ^~~~ | cnt
s481592916
p00334
C++
#include<iostream> #include<algorithm> #include<map> using namespace std; int main(){ map<int ,bool> memo; int N; cin>>N; int cnt=0; for(int i=0;i<N;i++){ int p[3]; cin>>p[0]>>p[1]>>p[2]; sort(p,p+3); int k=((p[0]-1)*1000+(p[1]-1))*1000+(p[2]-1); if(memo.find(k)!=memo.end()){ cnt++; }e...
a.cc: In function 'int main()': a.cc:31:9: error: 'cont' was not declared in this scope; did you mean 'cnt'? 31 | cont<<cnt<<endl; | ^~~~ | cnt
s977185719
p00334
C++
#include<iostream> #include<algorithm> #include<map> using namespace std; int main(){ map<int ,bool> memo; int N; cin>>N; int cnt=0; for(int i=0;i<N;i++){ int p[3]; cin>>p[0]>>p[1]>>p[2]; sort(p,p+3); int k=((p[0]-1)*1000+(p[1]-1))*1000+(p[2]-1); if(memo.find(k)!=memo.end()){ cnt++; }e...
a.cc: In function 'int main()': a.cc:31:9: error: 'cont' was not declared in this scope; did you mean 'cnt'? 31 | cont<<cnt<<endl; | ^~~~ | cnt
s524052486
p00334
C++
#include <iostream> #include <algorithm> #include <map> using namespace std; int main(){ map<int,bool> memo; int n; cin>>n; int c=0; for(int i=0;i<n;i++){ int p[3]; cin>>p[1]>>p[2]>>[3]; sort(p,p+3); int k=((p[0]-1)*1000+(p[1]-1))*1000+(p[2]-1); if(memo.find(k)!=memo.end()){ c++; }else{ memo...
a.cc: In function 'int main()': a.cc:15:35: error: expected identifier before numeric constant 15 | cin>>p[1]>>p[2]>>[3]; | ^ a.cc: In lambda function: a.cc:15:37: error: expected '{' before ';' token 15 | cin>>p[1]>>p[2]>>[3]; | ...
s485407803
p00334
C++
abc001 abc002 abc003 abc004 abc065 a #include <iostream> #include <set> #include <algorithm> using namespace std; int main() { set<set<int> > surfaces; int n; cin >> n; for (int i = 0; i < n; i++) { set<int> surface; int a, b, c; cin >> a >> b >> c; surface.insert(a); surface.insert(b...
a.cc:1:1: error: 'abc001' does not name a type 1 | abc001 abc002 abc003 abc004 abc065 a | ^~~~~~ 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:...
s488525729
p00334
C++
#include<cstdio> #include<iostream> #include<slgorithm> using namespace std; int main(void){ int n,p[1000][3],flg[1000],i,j,k,f,temp,cnt; cin>>n; for(i=0;i<n;i++) flg[i]=0; for(i=0;i<n;i++){ for(j=0;j<3;j++) cin>>p[i][j]; } for(i=0;i<n;i++){ sort(p[i],p[i]+3); } cnt=0; for(i=0;i<n-1;i++){ if(flg[i]!=1){ ...
a.cc:3:9: fatal error: slgorithm: No such file or directory 3 | #include<slgorithm> | ^~~~~~~~~~~ compilation terminated.
s318006874
p00334
C++
include<stdio.h> #include<algorithm> using namespace std ; int ans ; bool ok[ 1000 ][ 1000 ][ 1000 ] ; int aa[ 3 ] ; #define a aa[ 0 ] #define b aa[ 1 ] #define c aa[ 2 ] int main() { int n ; scanf( "%d" ,&n ) ; while( n-- ) { scanf( "%d %d %d" ,&a ,&b ,&c ) ; --a ; --b ; --c ; sort( a...
a.cc:1:1: error: 'include' does not name a type 1 | include<stdio.h> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gn...
s857607137
p00334
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int n,sum; cin>>n; int a[1000][3]; for(int i=0;i<n;i++){ cin>>a[i][0]>>a[i][1]>>a[i][2]; sort(a[i],a[i}+3); } for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ if(a[i][0]==a[j][0]&&a[i][1]==a[j][1]&&a[i][2]==a[j][2]){ a[j][0]=0; a[j][1]=0; a[j][2]=0; }...
a.cc: In function 'int main()': a.cc:10:14: error: expected ']' before '}' token 10 | sort(a[i],a[i}+3); | ^ | ] a.cc:10:14: error: expected ')' before '}' token 10 | sort(a[i],a[i}+3); | ~ ^ | ) a.cc:10:17: error: expected ';' before ')' t...
s233683408
p00334
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0; i<n; i++) using namespace std; bool flag[1001][1001][1001]={}; int n; cin >> n; int sum = 0; int a[3]; rep(i,n){ cin >> a[0] >> a[1] >> a[2]; sort(a,a+3); if(flag[a[0]][a[1]][a[2]]) sum++; flag[a[0]][a[1]][a[2]] = true; } cout << sum <<...
a.cc:6:3: error: 'cin' does not name a type 6 | cin >> n; | ^~~ a.cc:2:18: error: expected unqualified-id before 'for' 2 | #define rep(i,n) for(int i=0; i<n; i++) | ^~~ a.cc:9:3: note: in expansion of macro 'rep' 9 | rep(i,n){ | ^~~ a.cc:9:7: error: 'i' does not na...
s078084164
p00334
C++
#include<iosteam> #include<vector> using namespace std; int main(){ int n; cin>>n; vector<int> p1,p2,p3; for(int i=1;i<=n;i++){ p1.push_back(i); p2.push_back(i); p3.push_back(i); cin>>p1[i]>>p2[i]>>p3[i]; for(int j=0;j<2;j++){ if(p1[i]>=p2[i])swap(p1[i],p2[i]); if(p2[i]>=p3[i])swap(p2[i],p3[i]); } } ...
a.cc:1:9: fatal error: iosteam: No such file or directory 1 | #include<iosteam> | ^~~~~~~~~ compilation terminated.
s181268489
p00334
C++
#include<iostream> #include<vector> using namespace std; int main(){ int n; cin>>n; vector<int> p1,p2,p3; for(int i=1;i<=n;i++){ p1.push_back(i); p2.push_back(i); p3.push_back(i); cin>>p1[i]>>p2[i]>>p3[i]; for(int j=0;j<2;j++){ if(p1[i]>=p2[i])swap(p1[i],p2[i]); if(p2[i]>=p3[i])swap(p2[i],p3[i]); } }...
a.cc:32:2: error: '\U0000ff56' does not name a type 32 | }v | ^~
s054922641
p00335
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int n; cin >> n; int p[5000]; for(int i=0; i<n; i++){ cin >> p[i]; } int min_sum = 200000; for(int I=0; I<=p[0]; I++){ int q[5000]; for(int i=0; i<n; i++){ q[i]=p[i]; } int sum = I; q[0] -= I; f...
a.cc: In function 'int main()': a.cc:34:12: error: 'i' was not declared in this scope 34 | if(q[n-i]>0){ | ^
s137288286
p00335
C++
#include<iostream> using namespace std; int main(){ int n,p[5000],x=0; cin>>n; for(int i=1;i<=n;i++){ cin>>p[i]; } for(int i=1;i<n;i++){ while(p[i]>0){ x+=p[i]; p[i+1]-=p[i]; } if(p[n]>0){ x+=p[n]; } cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s573426209
p00335
C++
#include<iostream> using namespace std; int main(){ int n,p[5000],x=0; cin>>n; for(int i=1;i<=n;i++){ cin>>p[i]; } for(int i=1;i<n;i++){ while(p[i]>0){ x+=p[i]; p[i]=0; p[i+1]-=p[i]; } if(p[n]>0){ x+=p[n]; } cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s923172411
p00335
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s963529824
p00335
C++
#include <stdio.h> int main(){ int n,p[1000],i,count; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d"&p[i]); } count=0; for(i=1;i<=n;i++){ if(p[i]!=0 && p[i+1]!=0 && p[i+1]>p[i]){ count=count+p[i+1]; } if(p[i]!=0 && p[i+1]!=0 && p[i]>p[i+1]){ ...
a.cc: In function 'int main()': a.cc:6:19: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&' 6 | scanf("%d"&p[i]); | ~~~~^~~~~ | | | | | int | const char [3]
s809614702
p00335
C++
// ?????????.cpp : ??????????????? ??¢????????±????????§????????¨????????? ????????????????????????????????? // AOJ accept #include "stdafx.h" #include <iostream> using namespace std; int main() { int N; int counti = 0;//inside int counto = 0;//outside int p[5000]; int q[5000]; cin >> N; for (int i = 0; i < ...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s268700131
p00335
C++
#include <iostream> #include <cmath> using namespace std; int main(void){ int n; cin >> n; int pans[n + 1]; for(int i = 0; i < n; i++){ cin >> pans[i]; } int result = 20000; for(int i = 0; i <= pans[0]; i++){ int tempPans[n]; for(int j = 0; j < n; j++){ te...
a.cc: In function 'int main()': a.cc:24:17: error: 'temppans' was not declared in this scope; did you mean 'tempPans'? 24 | temppans[j] = 0; | ^~~~~~~~ | tempPans
s700397335
p00335
C++
xfdh
a.cc:1:1: error: 'xfdh' does not name a type 1 | xfdh | ^~~~
s542089547
p00335
C++
#include <iostream> using namespace std; #define REP(i,n) for(int i=0;i<n;++i) int n,a[5000],b[5000]; int main() { cin>>n; REP(i,n)cin>>b[i]; int ans = 1e6; REP(i,b[0]+1){ memcpy(a,b,sizeof(b)); a[0]-=i; int t=i; REP(j,n-1){ if(a[j]<1)continue; t+=a[j]*2; a[j+1]-=a[j]; } t += max(0, a[n-1]); ...
a.cc: In function 'int main()': a.cc:10:17: error: 'memcpy' was not declared in this scope 10 | memcpy(a,b,sizeof(b)); | ^~~~~~ a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+...
s943424958
p00335
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int N; cin>>N; int p[5000]; for(int i=0;i<N;i++){ cin>>p[i]; } int min_sum=20000; for(int i=0;i<p[0];i++){ int q[5000]; for(int j=0;j<N;j++){ q[i]=p[i]; } int sum=j; q[0]-=j; for(int j=0;j<N-2;j++){ if(q[i]<=0) ...
a.cc: In function 'int main()': a.cc:22:25: error: 'j' was not declared in this scope 22 | int sum=j; | ^
s766385938
p00335
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int N; cin>>N; int p[5000]; for(int i=0;i<N;i++){ cin>>p[i]; } int turn1=0; int q[5000]; for(int i=0;i<N;i++){ q[i]=p[i]; } for(int i=0;i<N;i++){ while(p[i]>0){ if(i==0){ if(p[0]>0){ p[0]--; p[1]--; turn...
a.cc: In function 'int main()': a.cc:66:25: error: 'else' without a previous 'if' 66 | else{ | ^~~~ a.cc: At global scope: a.cc:74:9: error: 'cout' does not name a type 74 | cout<<min(turn1,turn2)<<endl; | ^~~~ a.cc:76:9: error: expected ...
s712681274
p00335
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int N; cin>>N; int p[5000]; for(int i=0;i<N;i++){ cin>>p[i]; } int min_sum=20000; for(int I=0;i<=p[0];I++){ int q[5000]; for(int i=0;i<N;i++){ q[i]=p[i]; } int sum=I; q[0]-=I; for(int i=0;i<N-2;i++){ if(q[i]<=0){ con...
a.cc: In function 'int main()': a.cc:13:21: error: 'i' was not declared in this scope 13 | for(int I=0;i<=p[0];I++){ | ^ a.cc:30:45: error: expected ')' before ';' token 30 | min_sum=min(min(min_sum,sum); | ~ ^ ...
s357506563
p00335
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int N; cin>>N; int p[5000]; for(int i=0;i<N;i++){ cin>>p[i]; } int min_sum=20000; for(int i=0;i<=p[0];i++){ int q[5000]; for(int i=0;i<N;i++){ q[i]=p[i]; } int sum=I; q[0]-=I; for(int i=0;i<N-2...
a.cc: In function 'int main()': a.cc:23:13: error: 'I' was not declared in this scope 23 | int sum=I; | ^
s424091565
p00335
C++
#include<iostream> #include<algorithm> using namespace std; ?? int main(){ ????????int N; ????????cin>>N; ?????????? ????????int p[5000]; ????????for(int i=0;i<N;i++){ ????????????????cin>>p[i]; ????????} ?????????? ????????int min_sum=20000; ?? ????????for(int I=0;I<=p[0];I++){ ????????????????int q[5000]; ???????????...
a.cc:4:1: error: expected unqualified-id before '?' token 4 | ?? | ^ a.cc:44:1: error: expected unqualified-id before '?' token 44 | ???????? | ^
s052994552
p00335
C++
for(int j = 0; j < 2; j++){ V = S; for(int i = j; i < n-1; i++){ while( !(V[i] <= 0) ){ V[i]--; V[i+1]--; res+=2; } } while( !(V[n-1] <= 0) ){ V[n-1]--; res++; } while( !(V[0] <= 0) ){ V[0]--; res++; } ans = min(ans,res); cout << res << " "; res = 0; }
a.cc:1:1: error: expected unqualified-id before 'for' 1 | for(int j = 0; j < 2; j++){ | ^~~ a.cc:1:16: error: 'j' does not name a type 1 | for(int j = 0; j < 2; j++){ | ^ a.cc:1:23: error: 'j' does not name a type 1 | for(int j = 0; j < 2; j++){ | ^
s697280308
p00335
C++
#include <vector> #include <iostream> #include <utility> #include <iterator> #include <map> #include <algorithm> typedef std::vector<int> Max; typedef std::vector<int> Input; typedef std::vector<int> Section; typedef std::map<int, int> ScoreResult; std::map<std::string, Section> get_great_sections (Input input) { ...
a.cc:78:19: error: extended character   is not valid in an identifier 78 | if (size > 1 && input[section[1]] == 0) { | ^ a.cc: In function 'std::map<std::__cxx11::basic_string<char>, std::vector<int> > get_great_sections(Input)': a.cc:78:19: error: '\U000000a01' was not declared in th...
s702963441
p00335
C++
#include <vector> #include <iostream> #include <utility> #include <iterator> #include <map> #include <algorithm> typedef std::vector<int> Max; typedef std::vector<int> Input; typedef std::vector<int> Section; typedef std::map<int, int> ScoreResult; std::map<std::string, Section> get_great_sections (Input input) { ...
a.cc: In function 'int main()': a.cc:194:9: error: expected primary-expression before 'auto' 194 | auto section_map = get_great_sections(input); | ^~~~ a.cc:195:13: error: 'section_map' was not declared in this scope 195 | if (section_map.size() == 0) break; | ^~~~~~~...
s410018583
p00336
C
#include<stdio.h> #include<string.h> long speller( char *fake ,char *now ,int end ) { int ret = 0 ; int fake_p = 0 ,now_p = 0 ; if( now[ now_p ] < end ) { return 1 ; } while( fake[ fake_p ] != '\0' ) { if( fake[ fake_p ] == now[ now_p ] ) { ret += speller( fake + fake_p + 1 ,now + 1 ,end - 1 ) ;...
main.c:66:1: error: unterminated comment 66 | /* | ^
s479207701
p00336
C
/* ????????? ??????????????????????????? ??????????????? ?????£?????¶?????????????????????????????????????????????????????¶??????????????????????????????????????? ??¨??????????\??????????????????????????????????????????????????????????????????????????????????????????? ??????????????±??¨??????????????????????\????????...
main.c: In function 'main': main.c:75:30: error: 'dp' undeclared (first use in this function); did you mean 'd'? 75 | if ( dp[ i ][ j ] != 0 ) { // ??????????????????????????? | ^~ | d main.c:75:30: note: each undeclar...
s407411343
p00336
C++
// PCK2016予選7 イワシロ・イッツァ // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0341&lang=ja #include <bits/stdc++.h> using namespace std; int main(void){ string T,B; int dp[1001][1001]; cin >> T >> B; if(T[0]==B[0]){ dp[0][0]=1; } else{ dp[0][0]=0; } for(int j=1;j<...
a.cc:35:1: error: 'Close' does not name a type 35 | Close | ^~~~~
s119617340
p00336
C++
include <bits/stdc++.h> using namespace std; typedef long long int64; int64 memo[1111][1111]; int64 dfs(int i,int cnt); string t,b; int main(){ for(int i = 0;i < 1111;i++){ for(int j = 0;j < 1111;j++){ memo[i][j] = -1; } } t += '0'; string a; cin >> a >> b; t += a; cout...
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc:13:1: error: 'string' does not name a type 13 | string t,b; | ^~~~~~ a.cc: In function 'int main()': a.cc:29:3: error: 't' was not declared in this scope 29 | t += '0'; | ^ a.cc:31:3: error: 'strin...
s067813255
p00336
C++
#include<bits/stdc++.h> //?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? //?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? //???????????????????????????????????...
a.cc: In function 'void rep()': a.cc:10:49: error: redeclaration of 'int b' 10 | int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,b,w,x,y,z; | ^ a.cc:10:9: note: 'int b' previously declared here 10 | int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,b,w,x,y,z; ...
s586103769
p00337
C++
#include <stdio.h> #include <utility> #include <math.h> #include <algorithm> #include <stack> using namespace std; typedef pair< pair<int, int>, int> piii; bool comp(const piii *a, const piii *b) { if((*a).first.first * (*b).first.second > (*a).first.second * (*b).first.first) return true; else return false; } in...
a.cc: In function 'int main()': a.cc:23:31: error: 'struct std::pair<int, int>' has no member named 'fisrt'; did you mean 'first'? 23 | scanf("%d%d", &p[i].first.fisrt, &p[i].first.second); | ^~~~~ | first a.cc:38:5: error: expected primary-...
s061696107
p00337
C++
#include <bits/stdc++.h> using namespace std; #define int long long typedef complex<int> Point; bool Comp(const Point &p, const Point &q) { if (p.real() != q.real()) return p.real() < q.real(); return p.imag() < q.imag(); } int Cross(const Point &p, const Point &q) { return p.real()*q.imag() - p.imag()*...
a.cc: In function 'int main()': a.cc:97:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'long long int') 97 | cin >> v[i].real() >> v[i].imag(); | ~~~ ^~ ~~~~~~~~~~~ | | | | | lon...
s568485378
p00337
C++
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,a) for(int i=0;i<(a);++i) #define MP make_pair #define INF int(1e9) using namespace std; typedef pair<double, int> P; int V, R; double ans, flag[1000], flag2[1000]; vector <complex<double> > pt; vector <double> edge[1000]; priority_queu...
a.cc: In function 'bool border(int, int)': a.cc:24:41: error: assignment of function 'std::ios_base& std::left(ios_base&)' 24 | if(com.imag() < 0) left = 1; | ~~~~~^~~ a.cc:25:42: error: assignment of function 'std::ios_base& std::right(ios_base&)' 25 | ...
s263442061
p00337
C++
#include<iostream> #include<algorithm> #include<vector> #include<map> using namespace std; int V,R; double EPS=1e-10; double add(double a,double b){ if(abs(a+b)<EPS*(abs(a)+abs(b)))return 0; return a+b; } struct P{ double x,y; P(){x=0;y=0;} P(double x,double y):x(x),y(y){} P operator +(P p){ return P(add(x,p.x),a...
a.cc: In function 'double dist(P, P)': a.cc:45:16: error: 'sqrt' was not declared in this scope 45 | return sqrt((p.x-q.x)*(p.x-q.x)+(p.y-q.y)*(p.y-q.y)); | ^~~~
s392287616
p00337
C++
#include<iostream> #include<algorithm> #include<vector> #include<map> using namespace std; int V,R; double EPS=1e-10; double add(double a,double b){ if(abs(a+b)<EPS*(abs(a)+abs(b)))return 0; return a+b; } struct P{ double x,y; P(){x=0;y=0;} P(double x,double y):x(x),y(y){} P operator +(P p){ return P(add(x,p.x),a...
a.cc: In function 'double dist(P, P)': a.cc:45:16: error: 'sqrt' was not declared in this scope 45 | return sqrt((p.x-q.x)*(p.x-q.x)+(p.y-q.y)*(p.y-q.y)); | ^~~~
s161414333
p00337
C++
#include<iostream> #include<algorithm> #include<vector> #include<cmath> #include<map> using namespace std; int V,R; double EPS=1e-10; double add(double a,double b){ if(abs(a+b)<EPS*(abs(a)+abs(b)))return 0; return a+b; } struct P{ double x,y; P(){x=0;y=0;} P(double x,double y):x(x),y(y){} P operator +(P p){ retur...
a.cc: In function 'int main()': a.cc:94:71: error: 'INF' was not declared in this scope 94 | for(int i=0;i<V;i++)for(int j=0;j<V;j++)edge[i][j]=edge[j][i]=INF; | ^~~
s426792736
p00337
C++
#include <bits/stdc++.h> using namespace std; double EPS=1e-10; double add(double a,double b) { if(abs(a+b)<EPS*(abs(a)+abs(b))) return 0; return a+b; } typedef pair<int,int> PI; typedef pair<double,PI> E; struct P { double x,y; P() {} P(double x,double y):x(x),y(y) {} P operator+(P p) const{ return P(add(x,p.x...
a.cc: In function 'void init(int)': a.cc:57:17: error: reference to 'rank' is ambiguous 57 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/1...