submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s085644019
p00432
C
#include<string.h> #include<stdio.h> #define max(x,y) ((x>y)?x:y) #define min(x,y) ((x<y)?x:y) using namespace std; int g[10003][10003]; int n,r; int main(){ while(1){ int ans=0,ans2=0,minx=10001,miny=10001,maxx=1,maxy=1; scanf("%d%d",&n,&r); if(n==0 && r==0)break; memset(g,0,sizeof(g)); for(int i=0;i<n;i+...
main.c:5:1: error: unknown type name 'using' 5 | using namespace std; | ^~~~~ main.c:5:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 5 | using namespace std; | ^~~
s613677969
p00432
C
#include<iostream> #include<algorithm> #include<cstring> #include<cstdio> using namespace std; int g[10003][10003]; int n,r; int main(){ while(1){ int ans=0,ans2=0,minx=10001,miny=10001,maxx=1,maxy=1; scanf("%d%d",&n,&r); if(n==0 && r==0)break; memset(g,0,sizeof(g)); for(int i=0;i<n;i++){ int x1,y1,x2,y...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s882026178
p00432
C
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int g[10003][10003]; int n,r; int main(){ while(scanf("%d%d",&n,&r),n){ memset(g,0,sizeof(g)); int mx = 10001,Mx = 1,my = 10001,My = 1; for(int i = 0; i < n; i++){ int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); a++;b++;c++;d++; ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s835725477
p00432
C++
#include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <map> using namespace std; typedef long long ll; #define INF 2000000000 #define LLINF 4000000000000000000 #define SIZE 10004 int mm[SIZE][SIZE]...
a.cc: In function 'void calc(int, int)': a.cc:26:5: error: 'memset' was not declared in this scope 26 | memset(mm,0,sizeof(mm)); | ^~~~~~ a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <map> +++ |+#include <cstring>...
s522214106
p00432
C++
#include<iostream> #include<stdio.h> #include<list> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int short[10001][10001]; int main(){ int n,r; int S=0; int L=0; int state; while(1){ cin>>n>>r; if(n==0&&r==0)break; ...
a.cc:9:11: error: expected identifier before numeric constant 9 | int short[10001][10001]; | ^~~~~ a.cc:9:11: error: expected ']' before numeric constant 9 | int short[10001][10001]; | ^~~~~ | ] a.cc:9:10: error: structured binding declaration cannot have type 'sh...
s972667458
p00432
C++
#include <iostream> #include <vector> using namespace std; const static int MAX = 10000; bool Sheets[MAX+2][MAX+2]; int count(int x,int y) { int dx[4] = {-1,0,0,1}; int dy[4] = {0,1,-1,0}; int cnt = 0; for(int d=0;d<4;d++) { if(!Sheets[x+dx[d]][y+dy[d]]) cnt++; } return cnt; } int main() { io...
a.cc: In function 'int main()': a.cc:26:5: error: 'memset' was not declared in this scope 26 | memset(Sheets,0,sizeof(Sheets)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vector> +++ |+#include <cstring...
s270376660
p00432
C++
#include<stdio.h> main(){ printf(" ") }
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:3:14: error: expected ';' before '}' token 3 | printf(" ") | ^ | ; 4 | } | ~
s696704374
p00432
C++
#include<iostream> #include<cstdio> #include<vector> #include<cmath> #include<complex> #include<utility> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define ALL(C) (C).begin(),(C).end() #define mp make_pair #define pb push_back const int N = 30000; cl...
a.cc: In function 'void makedata(int, int*, int*, int*, int*, int&, int&)': a.cc:53:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 53 | sort(ALL(xd)); | ^~~~ | sqrt a.cc:55:12: error: 'unique' was not declared in this scope 55 | xd.erase(unique(ALL(xd)),xd.end()); ...
s209830358
p00432
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<vector> #include<cmath> #include<complex> #include<utility> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define ALL(C) (C).begin(),(C).end() #define mp make_pair #define pb push_back cons...
a.cc:22:6: error: extra qualification 'st::' on member 'operator<' [-fpermissive] 22 | bool st::operator<(const st & a)const{ | ^~ a.cc:102:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 102 | main(){ | ^~~~
s569124742
p00432
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<vector> #include<cmath> #include<complex> #include<utility> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define ALL(C) (C).begin(),(C).end() #define mp make_pair #define pb push_back cons...
a.cc: In function 'void makedata(int, int*, int*, int*, int*, int&, int*, std::vector<st>*)': a.cc:55:42: error: no match for 'operator=' (operand types are 'std::vector<st>' and 'void*') 55 | rep(i,px)IN[i]=malloc(sizeof(st)*req[i]),req[i]=0; | ^ In file included fro...
s924232482
p00432
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<vector> #include<cmath> #include<complex> #include<utility> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define ALL(C) (C).begin(),(C).end() #define mp make_pair #define pb push_back cons...
a.cc: In function 'void makedata(int, int*, int*, int*, int*, int&, int*, std::vector<st>*)': a.cc:52:31: error: '__gnu_cxx::__alloc_traits<std::allocator<st>, st>::value_type' {aka 'class st'} has no member named 'begin'; did you mean 'beg'? 52 | if (y1[i] <= IN[j][k].begin && IN[j][k].end <= y2[i]){ ...
s208085867
p00432
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<vector> #include<cmath> #include<complex> #include<utility> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define ALL(C) (C).begin(),(C).end() #define mp make_pair #define pb push_back cons...
a.cc: In function 'void makedata(int, int*, int*, int*, int*, int&, int*, std::vector<st>*)': a.cc:56:35: warning: narrowing conversion of '*(y1 + ((sizetype)(((long unsigned int)i) * 4)))' from 'int' to 'short int' [-Wnarrowing] 56 | if (!isin)IN[j].pb((st){y1[i],y2[i]}); | ...
s697977928
p00432
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<vector> #include<cmath> #include<complex> #include<utility> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define ALL(C) (C).begin(),(C).end() #define mp make_pair #define pb push_back #defi...
a.cc: In function 'void makedata(int, int*, int*, int*, int*, int&, int*, std::vector<std::pair<int, int> >*)': a.cc:14:13: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'int' 14 | #define fir first a.cc:43:28: note: in expansion of macro 'fir' 43 | short &Y3=IN[j][...
s025913219
p00432
C++
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> using namespace std; int map[10003][10003]; int main(){ while(1){ int n,r,ans=0,ans2=0,minx=10001,miny=10001,maxx=0,maxy=0; scanf("%d%d",&n,&r); if(n==0 && r==0)break; memset(map,0,sizeof(map)); for(int i=0;i<n;i++){ int x1,y1,x2,...
a.cc: In function 'int main()': a.cc:28:17: error: 'mx' was not declared in this scope; did you mean 'maxy'? 28 | mx++,my++; | ^~ | maxy a.cc:28:22: error: 'my' was not declared in this scope; did you mean 'maxy'? 28 | mx++,my++; | ...
s079705399
p00432
C++
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> using namespace std; int map[100000][100000]; int n,r; int main(){ while(1){ int ans=0,ans2=0,minx=10001,miny=10001,maxx=1,maxy=1; scanf("%d%d",&n,&r); if(n==0 && r==0)break; memset(map,0,sizeof(map)); for(int i=0;i<n;i++){ int x1...
/tmp/ccTmT0zt.o: in function `main': a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `r' defined in .bss section in /tmp/ccTmT0zt.o a.cc:(.text+0x3f): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccTmT0zt.o a.cc:(.text+0x5c): relocation trunc...
s701549728
p00432
C++
int g[10005][10005]; int n,r; int main(){ while(1){ int ans=0,ans2=0,minx=10001,miny=10001,maxx=1,maxy=1; scanf("%d%d",&n,&r); if(n==0 && r==0)break; memset(g,0,sizeof(g)); for(int i=0;i<n;i++){ int x1,y1,x2,y2; scanf("%d%d%d%d",&x1,&y1,&x2,&y2); x1++,y1++,x2++,y2++; minx=min(min(x1,x2),minx); ...
a.cc: In function 'int main()': a.cc:7:17: error: 'scanf' was not declared in this scope 7 | scanf("%d%d",&n,&r); | ^~~~~ a.cc:9:17: error: 'memset' was not declared in this scope 9 | memset(g,0,sizeof(g)); | ^~~~~~ a.cc:1:1: note: 'mem...
s985214402
p00432
C++
#include<iostream> #include<algorithm> #include<cstring> #include<cstdio> #include<vector> #include<map> using namespace std; typedef vector<int> PP; typedef vector<PP> P; int n,r; int x1[10001],x2[10001],y1[10001],y2[10001]; short int[3000][3000]; vector<int> vx; vector<int> vy; void zatu(){ for(int i=0;i<n;i++){ ...
a.cc:11:25: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch] 11 | int x1[10001],x2[10001],y1[10001],y2[10001]; | ^~ a.cc:12:11: error: expected identifier before numeric constant 12 | short int[3000][3000]; | ^~~~ a.cc:12:11: e...
s556104424
p00432
C++
#include <cstdio> #include <algorithm> #include <vector> #include <cstring> using namespaece std; typedef pair<int,int> P; #define pb push_back #define mp make_pair vector<P>vec[10005]; int num[10005]; int rank[10005]; int par[10005]; void init(int n) { for(int i=0;i<n;i++) { rank[i]=0; par[i]=i; ...
a.cc:5:7: error: expected nested-name-specifier before 'namespaece' 5 | using namespaece std; | ^~~~~~~~~~ a.cc:6:9: error: 'pair' does not name a type 6 | typedef pair<int,int> P; | ^~~~ a.cc:9:1: error: 'vector' does not name a type 9 | vector<P>vec[10005]; | ^~~~~~ a.cc: I...
s657977215
p00432
C++
//39 #include<iostream> #include<algorithm> #include<vector> #include<utility> using namespace std; int main(){ for(int n,r;cin>>n>>r,n|r;){ vector<pair<short,short> >v[10000]; for(int i=0;i<n;i++){ int x,y,xx,yy; cin>>x>>y>>xx>>yy; for(int j=y;j<yy;j++){ v[j].push_back(make_pair(x,xx)); ...
a.cc: In function 'int main()': a.cc:25:16: error: no matching function for call to 'max(int&, short int&)' 25 | m=max(m,v[i][k].second); | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s845663084
p00432
C++
include <cstdio> #include <utility> #include <map> using namespace std; int n; short min_x1, max_x2, min_y1, max_y2; short x1, x2, y1, y2; map<pair<short, short>, short> *variation; char tiles[10002][10002]; void variation_inc(short x, short y) { short value; map<pair<short, short>, short>::iterator location...
a.cc:1:1: error: 'include' does not name a type 1 | include <cstdio> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/utility:69, from a.cc:2: /usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared 295 |...
s001527005
p00432
C++
#include <iostream> int main() { int p[10010][10010]={0}; while(1) { int n; cin >> n; break; } return 0; }
a.cc: In function 'int main()': a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | cin >> n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard ...
s450331805
p00432
C++
#include <iostream> using namespace std; int main() { int n,r; while(1) { cin >> n >> r; int m[10010][10010]; memset(m,0,sizeof(m)); int j=0; for(int i=0;i<n;i++) { int a,b,c,d; cin >> a >> b >> c>>d; m[i][j]; j++; } } return 0; }
a.cc: In function 'int main()': a.cc:10:1: error: 'memset' was not declared in this scope 10 | memset(m,0,sizeof(m)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 | using ...
s572655696
p00432
C++
#include <iostream> #include <cstring> using namespace std; int main() { int n,r; while(1) { cin >> n >> r; int m[10010][10010]; memset(m,0,sizeof(m)); return 0; }
a.cc: In function 'int main()': a.cc:13:2: error: expected '}' at end of input 13 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s866283853
p00432
C++
#include <algorithm> #include <iostream> #include <map> using namespace std; typedef pair<int,int> P; #define fi first #define sec second int a,b,c,d,n,r; int le,ri,up,down; int area,len; map<P,int> m; map<P,int>::iterator it; int imos[2][10004]; int main() { while(1) { memset(imos,0,sizeof(imos)); ...
a.cc: In function 'int main()': a.cc:18:9: error: 'memset' was not declared in this scope 18 | memset(imos,0,sizeof(imos)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <map> +++ |+#include <cstrin...
s028136751
p00432
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <map> using namespace std; typedef pair<int,int> P; #define INF 1000000000 #define fi first #define sec second int a,b,c,d,n,r; int le,ri,up,down; int area,len; map<P,int> *m; map<P,int>::iterator it; int imos[2][10004]; int main() {...
a.cc: In function 'int main()': a.cc:36:14: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>*' and 'P' {aka 'std::pair<int, int>'}) 36 | m[P(a,b)]++; | ^ a.cc:37:14: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>...
s407938390
p00432
C++
import java.util.*; import java.lang.*; import java.io.*; import static java.util.Arrays.*; import static java.util.Collections.*; import static java.lang.Math.*; /* Name of the class has to be "Main" only if the class is public. */ class Main { int MAX = 10005; void run() { Scanner sc = new Scanner(System.in); ...
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.lang.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1...
s851391622
p00432
C++
#include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <string.h> #include <stack> #include <list> #include <vector> using namespace std; int N, R; bool **cover; int dx[4] = {0,1,0,-1}; int dy[4] = {-1,0,1,0}; int main(){ cover = new bool*[10002]; for(int i=0; i<10002; ++i){ cover[...
a.cc:60:2: error: stray '#' in program 60 | }#include <cstdio> | ^ a.cc:60:3: error: 'include' does not name a type 60 | }#include <cstdio> | ^~~~~~~ a.cc:70:5: error: redefinition of 'int N' 70 | int N, R; | ^ a.cc:11:5: note: 'int N' previously declared here 11 | int N, R; |...
s468116778
p00433
Java
import java.util.Scanner; public class Score { public static void main(String[] args) { int ans = 0; for(int i=0;i<2;i++){ int sum=0; for(int j=0;j<4;j++){ Scanner stdIn = new Scanner(System.in); int p = stdIn.nextInt(); sum += p; } ans = Math.max(sum, ans); } System.out.println(ans); ...
Main.java:2: error: class Score is public, should be declared in a file named Score.java public class Score { ^ 1 error
s485740907
p00433
Java
import java.until.Scanner; public class Main { public static void main(String[] args) { int a = 0; int b = 0; java.util.Scanner stdIn = new Scanner(System.in); for(int i=0;i<4;i++){ int p = stdIn.nextInt(); a += p; } for(int i=0;i<4;i++){ int p = stdIn.nextInt(); b += p; } System.out.print...
Main.java:1: error: package java.until does not exist import java.until.Scanner; ^ Main.java:7: error: cannot find symbol java.util.Scanner stdIn = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:16: error: cannot find symbol Syst...
s789124150
p00433
Java
import java.util.Scanner; public class q0510 { public static void main(String[] args){ Scanner in = new Scanner(System.in); int[] a = new int[4]; int[] b = new int[4]; int sumA = 0, sumB = 0; for(int i = 0; i < 4; i++){ a[i] = in.nextInt(); sumA += a[i]; } for(int i = 0; i < 4; i++){ ...
Main.java:3: error: class q0510 is public, should be declared in a file named q0510.java public class q0510 { ^ 1 error
s432116410
p00433
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int sumA, sumB; while((n = sc.nextInt()) != 0){ sumA = sumB = 0; for(int i = 0; i < 4; i++){ sumA += sc.nextInt(); } for(int i = 0; i < 4; i++){ sumB += sc.nextInt(); } Syst...
Main.java:7: error: cannot find symbol while((n = sc.nextInt()) != 0){ ^ symbol: variable n location: class Main 1 error
s879723059
p00433
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ int sumA = 0; int sumB = 0; for(int i=0;i<4;i++)sumA += stdIn.nextInt(); for(int j=0;j<4;j++)sumB += stdIn.nextInt(); if(sumA >= sumB)System.out.println(sumA); else if(sumA < sumB)System.out.println(sumB); } }
Main.java:7: error: cannot find symbol for(int i=0;i<4;i++)sumA += stdIn.nextInt(); ^ symbol: variable stdIn location: class Main Main.java:8: error: cannot find symbol for(int j=0;j<4;j++)sumB += stdIn.nextInt(); ^ symbol: variable stdIn locat...
s113065055
p00433
C
#include<stdio.h> int main(void) { int a1,a2,a3,a4,b1,b2,b3,b4,s,t; scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4); s=a1+a2+a3+a4; t=b1+b2+b3+b4; if(s<=t){ printf("%d\n",t); } else if(t<=s){ printf("%d\n",s); } return 0; }
main.c: In function 'main': main.c:4:12: error: stray '\343' in program 4 | int<U+3000>a1,a2,a3,a4,b1,b2,b3,b4,s,t; | ^~~~~~~~
s467893088
p00433
C
#include<stdio.h> int main(void) { int a1,a2,a3,a4,b1,b2,b3,b4,s,t; scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4); s=a1+a2+a3+a4; t=b1+b2+b3+b4; if(s<t){ printf("%d\n",t); } else if(t<s){ printf("%d\n",s); } else if(s==t){ printf("%d\n",s); } return 0; }
main.c: In function 'main': main.c:4:12: error: stray '\343' in program 4 | int<U+3000>a1,a2,a3,a4,b1,b2,b3,b4,s,t; | ^~~~~~~~
s563895316
p00433
C
#include<stdio.h> int main(void) { int a1,a2,a3,a4,b1,b2,b3,b4,s,t; scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4); s=a1+a2+a3+a4; t=b1+b2+b3+b4; if(s<t){ printf("%d\n",t); } else if(t<s){ printf("%d\n",s); } else if(s==t){ printf("%d\n",s); } return 0; }
main.c: In function 'main': main.c:4:12: error: stray '\343' in program 4 | int<U+3000>a1,a2,a3,a4,b1,b2,b3,b4,s,t; | ^~~~~~~~
s432759044
p00433
C
#include<stdio.h> int a,b,i,x; int main(){ for(i=0;i<4;i++){ scanf("%d",&x); a+=n; } for(i=0;i<4;i++){ scanf("%d",&x); b+=n; } if(a>b) printf("%d\n",a); else printf("%d\n",b); return 0; }
main.c: In function 'main': main.c:6:4: error: 'n' undeclared (first use in this function) 6 | a+=n; | ^ main.c:6:4: note: each undeclared identifier is reported only once for each function it appears in
s333652010
p00433
C
#include<stdio.h> int main(){ int a[4],i,at=0,bt=0; for(i=0;i<3;i++){ scanf("%d",&a[i]); at++=a[i]; } for(i=0;i<3;i++){ scanf("%d",&a[i]); bt++=a[i]; } if(at<bt){ printf("%d\n",bt); } else{ printf("%d\n",at); } return(0); }
main.c: In function 'main': main.c:6:9: error: lvalue required as left operand of assignment 6 | at++=a[i]; | ^ main.c:10:9: error: lvalue required as left operand of assignment 10 | bt++=a[i]; | ^
s848385668
p00433
C
#include <stdio.h> int main(){ int a,b,c,d,e,f,g while(1){ scanf("%d %d %d %d",&a,&b,&c,&d); scanf("%d %d %d %d",&e,&f,&g,&h); i=a+b+c+d; j=e+f+g+h; if(i==j){ printf("%d\n",i); }else if(i<j){ printf("%d\n",j); }else if(i>j){ printf("%d\n",i); } } }
main.c: In function 'main': main.c:5:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'while' 5 | while(1){ | ^~~~~
s118814098
p00433
C
include<stdio.h> int main(void){ int a,b,c,d,a1,b1,c1,d1; scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&a1,&b1,&c1,&d1); if(a+b+c+d>=a1+b1+c1+d1){printf("%d\n",a+b+c+d);} else{printf("%d\n",a1+b1+c1+d1);} return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s074347548
p00433
C
include<stdio.h> int main(void){ int a,b,c,d,a1,b1,c1,d1; scanf("%d%d%d%d",&a,&b,&c,&d); scanf("%d%d%d%d",&a1,&b1,&c1,&d1); if(a+b+c+d>=a1+b1+c1+d1){printf("%d\n",a+b+c+d);} else{printf("%d\n",a1+b1+c1+d1);} return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s588583571
p00433
C
include<stdio.h> int main(void){ int a,b,c,d,a1,b1,c1,d1,an,bn; scanf("%d%d%d%d",&a,&b,&c,&d); scanf("%d%d%d%d",&a1,&b1,&c1,&d1); an=a+b+c+d; bn=a1+b1+c1+d1; if(an>=bn){printf("%d\n",an);} else{printf("%d\n",bn);} return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s595113051
p00433
C
#include<stdio.h> int main(){] int a[4],b[4],asum,bsum; scanf("%d %d %d %d\n%d %d %d %d",&a[0],&a[1],&a[2],&a[3],&b[0],&b[1],&b[2],&b[3]); asum = a[0]+a[1]+a[2]+a[3]; bsum = b[0]+b[1]+b[2]+b[3]; if(asum>bsum)printf("%d\n",asum);else printf("%d\n",bsum); return 0; }
main.c: In function 'main': main.c:2:12: error: expected statement before ']' token 2 | int main(){] | ^
s463062629
p00433
C
#include<stdio.h> int main(void){ int a[4]={0}; int b[4]={0}; int t1=0,t2=0; //for(int j=0;j<2;j++){ if (i=1) scanf a[] //for(int i=0;i<4;i++){ scanf("%d %d %d %d",&a[0],&a[1],&a[2],&a[3]); scanf("%d %d %d %d",&b[0],&b[1],&b[2],&b[3]); //} //} for(int k=0;i<4;k++){ t1+=a[k]; t2+=b[k]; } if(t1>=t2) printf("%d"...
main.c: In function 'main': main.c:19:13: error: 'i' undeclared (first use in this function) 19 | for(int k=0;i<4;k++){ | ^ main.c:19:13: note: each undeclared identifier is reported only once for each function it appears in
s125915560
p00433
C
#include<stdio.h> int main(void){int a[4]={0}; int b[4]={0}; int t1=0,t2=0; int k; scanf("%d %d %d %d",&a[0],&a[1],&a[2],&a[3]); scanf("%d %d %d %d",&b[0],&b[1],&b[2],&b[3]); for( k=0;i<4;k++){ t1+=a[k]; t2+=b[k]; } if(t1>=t2) printf("%d",t1); else printf("%d",t2); return 0; }
main.c: In function 'main': main.c:12:10: error: 'i' undeclared (first use in this function) 12 | for( k=0;i<4;k++){ | ^ main.c:12:10: note: each undeclared identifier is reported only once for each function it appears in
s979662421
p00433
C
#include<stdio.h> int main(void){int a[4]={0}; int b[4]={0}; int t1=0,t2=0; int k; scanf("%d %d %d %d",&a[0],&a[1],&a[2],&a[3]); scanf("%d %d %d %d",&b[0],&b[1],&b[2],&b[3]); for( k=0;i<4;k++){ t1+=a[k]; t2+=b[k]; } if(t1>=t2) printf("%d\n",t1); else printf("%d\n",t2); return 0; }
main.c: In function 'main': main.c:12:10: error: 'i' undeclared (first use in this function) 12 | for( k=0;i<4;k++){ | ^ main.c:12:10: note: each undeclared identifier is reported only once for each function it appears in
s143760538
p00433
C
#include<stdio.h> int main(void){int a[4]={0}; int b[4]={0}; int t1=0,t2=0; int k; scanf("%d %d %d %d",&a[0],&a[1],&a[2],&a[3]); scanf("%d %d %d %d",&b[0],&b[1],&b[2],&b[3]); for( k=0;i<4;k++){ t1+=a[k]; t2+=b[k]; } if(t1>=t2) printf("%d\n",t1); else printf("%d\n",t2); return 0; }
main.c: In function 'main': main.c:12:10: error: 'i' undeclared (first use in this function) 12 | for( k=0;i<4;k++){ | ^ main.c:12:10: note: each undeclared identifier is reported only once for each function it appears in
s691282100
p00433
C
#include <stdio.h> int main(void){ int aj,as,ar,ae,bj,bs,br,be,S,T; scanf("%d %d %d %d", &ai,&as,&ar,&ae); scanf("%d %d %d %d", &bi,&bs,&br,&be); S=ai+as+ar+ae; T=bi+bs+br+be; if(S>=T) printf("%d",S); else printf("%d",T); retrun 0; }
main.c: In function 'main': main.c:7:23: error: 'ai' undeclared (first use in this function); did you mean 'ae'? 7 | scanf("%d %d %d %d", &ai,&as,&ar,&ae); | ^~ | ae main.c:7:23: note: each undeclared identifier is reported only once for each function it appea...
s119309876
p00433
C
#include <stdio.h> int main(void){ int aj,as,ar,ae,bj,bs,br,be,S,T; scanf("%d %d %d %d", &ai,&as,&ar,&ae); scanf("%d %d %d %d", &bi,&bs,&br,&be); S=ai+as+ar+ae; T=bi+bs+br+be; if(S>=T) printf("%d\n",S); else printf("%d\n",T); return 0; }
main.c: In function 'main': main.c:7:23: error: 'ai' undeclared (first use in this function); did you mean 'ae'? 7 | scanf("%d %d %d %d", &ai,&as,&ar,&ae); | ^~ | ae main.c:7:23: note: each undeclared identifier is reported only once for each function it appea...
s277204664
p00433
C
#include <stdio.h> int main(void){ int aj,as,ar,ae,bj,bs,br,be,S,T; scanf("%d %d %d %d", &ai,&as,&ar,&ae); scanf("%d %d %d %d", &bi,&bs,&br,&be); S=ai+as+ar+ae; T=bi+bs+br+be; if(S>=T) printf("%d\n",S); else printf("%d\n",T); return 0; }
main.c: In function 'main': main.c:7:23: error: 'ai' undeclared (first use in this function); did you mean 'ae'? 7 | scanf("%d %d %d %d", &ai,&as,&ar,&ae); | ^~ | ae main.c:7:23: note: each undeclared identifier is reported only once for each function it appea...
s950587133
p00433
C
#include <stdio.h> int main(void){ int aj,as,ar,ae,bj,bs,br,be,S,T; scanf("%d %d %d %d", &ai,&as,&ar,&ae); scanf("%d %d %d %d", &bi,&bs,&br,&be); S=ai+as+ar+ae; T=bi+bs+br+be; if(S>=T) printf("%d\n",S); else printf("%d\n",T); return 0; }
main.c: In function 'main': main.c:7:23: error: 'ai' undeclared (first use in this function); did you mean 'ae'? 7 | scanf("%d %d %d %d", &ai,&as,&ar,&ae); | ^~ | ae main.c:7:23: note: each undeclared identifier is reported only once for each function it appea...
s472748572
p00433
C
#include <stdio.h> int main(void){ int j1, s1, r1, e1; int j2, s2, r2, e2; int sum1 = 0, sum2 = 0; scanf("%d %d %d %d %d %d %d %d", &j1, &s1, &r1, &e1, &j2, &s2, &r2, &e2); sum1 = j1+s1+r1+e1; sum2 = l2+s2+r2+e2; if (sum1 > sum2) printf("%d\n", sum1); else printf("%d\n", sum2); return 0; }
main.c: In function 'main': main.c:11:16: error: 'l2' undeclared (first use in this function); did you mean 'e2'? 11 | sum2 = l2+s2+r2+e2; | ^~ | e2 main.c:11:16: note: each undeclared identifier is reported only once for each function it appears in
s440089651
p00433
C
#include "stdlib.h" #include "stdafx.h" typedef struct { int math; int information; int science; int English; }StudentScore; int main(void) { int sum1 = 0, sum2 = 0; StudentScore StudentScore1; StudentScore StudentScore2; scanf("%d", &StudentScore1.math); printf(" "); scanf("%d", &StudentScore1.information)...
main.c:2:10: fatal error: stdafx.h: No such file or directory 2 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s588066153
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } a=[0].to_i b=[1].to_i c=[2].to_i d=[3].to_i e=[4].to_i f=[5].to_i g=[6].to_i h=[7]....
main.c: In function 'main': main.c:15:2: error: 'a' undeclared (first use in this function) 15 | a=[0].to_i | ^ main.c:15:2: note: each undeclared identifier is reported only once for each function it appears in main.c:15:4: error: expected expression before '[' token 15 | a=[0].to_i | ^ main.c:...
s740714323
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } int a,b,c,d a=[0].to_i b=[1].to_i c=[2].to_i d=[3].to_i for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } int e,f,g,h e=[4].to_i f=[5]...
main.c: In function 'main': main.c:10:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a' 10 | a=[0].to_i | ^ main.c:15:21: error: expected ';' before ')' token 15 | for(i=0;i<4;i++){ | ^ | ; main.c:15:21: error: expected statement...
s061416321
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } int a,b,c,d; a=[0].to_i; b=[1].to_i; c=[2].to_i; d=[3].to_i; for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } int e,f,g,h; e=[4].to_i...
main.c: In function 'main': main.c:10:4: error: expected expression before '[' token 10 | a=[0].to_i; | ^ main.c:11:3: error: expected expression before '[' token 11 | b=[1].to_i; | ^ main.c:12:3: error: expected expression before '[' token 12 | c=[2].to_i; | ^ main.c:13:3: error: exp...
s213805339
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } a=student_A[0]+student_A[1]+student_A[2]+student_A[3]; b=student_B[0]+student_B[1]+stu...
main.c: In function 'main': main.c:13:1: error: 'a' undeclared (first use in this function) 13 | a=student_A[0]+student_A[1]+student_A[2]+student_A[3]; | ^ main.c:13:1: note: each undeclared identifier is reported only once for each function it appears in main.c:14:1: error: 'b' undeclared (first use in this f...
s776096878
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } int a,b; a=student_A[0]+student_A[1]+student_A[2]+student_A[3]; b=student_B[0]+stude...
main.c: In function 'main': main.c:17:21: error: expected ';' before 'b' 17 | puts b; | ^~ | ; main.c:20:21: error: expected ';' before 'a' 20 | puts a; | ^~ | ; main.c:22:29: er...
s707206644
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } int a,b; a=student_A[0]+student_A[1]+student_A[2]+student_A[3]; b=student_B[0]+stude...
main.c: In function 'main': main.c:16:16: error: expected ')' before ';' token 16 | if (a<b;){ | ~ ^ | ) main.c:17:21: error: expected ';' before 'b' 17 | puts b; | ^~ | ; main.c:19:16: error: expec...
s044781057
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } int a,b; a=student_A[0]+student_A[1]+student_A[2]+student_A[3]; b=student_B[0]+stude...
main.c: In function 'main': main.c:17:22: error: expected ';' before 'b' 17 | ;puts b; | ^~ | ; main.c:20:22: error: expected ';' before 'a' 20 | ;puts a; | ^~ | ; main.c:22:...
s024638658
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } int a,b; a=student_A[0]+student_A[1]+student_A[2]+student_A[3]; b=student_B[0]+stude...
main.c: In function 'main': main.c:17:21: error: expected ';' before string constant 17 | puts "b"; | ^~~~ | ; main.c:20:21: error: expected ';' before string constant 20 | puts "a"; | ^~~~ | ...
s313484138
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } int a,b; a=student_A[0]+student_A[1]+student_A[2]+student_A[3]; b=student_B[0]+stude...
main.c: In function 'main': main.c:25:6: error: expected declaration or statement at end of input 25 | return 0; | ^~~~~~ main.c:25:6: error: expected declaration or statement at end of input
s673223664
p00433
C
#include <stdio.h> int main(){ int i; int student_A[4], student_B[4]; for(i=0;i<4;i++){ scanf("%d", &student_A[i]); } for(i=0;i<4;i++){ scanf("%d", &student_B[i]); } int a,b; a=student_A[0]+student_A[1]+student_A[2]+student_A[3]; b=student_B[0]+stude...
main.c: In function 'main': main.c:26:9: error: expected declaration or statement at end of input 26 | } | ^
s041437573
p00433
C
a,b,c;main(i){scanf("%d",&c);(i<5?a:b)+=c;i-8?main(i+1):printf("%d\n",a>b?a:b);}
main.c:1:1: warning: data definition has no type or storage class 1 | a,b,c;main(i){scanf("%d",&c);(i<5?a:b)+=c;i-8?main(i+1):printf("%d\n",a>b?a:b);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplici...
s046076277
p00433
C
#include <stdio.h> main(){ int a[4],b[4],s,t; scanf("%d#include <stdio.h> main(){ int a[4],b[4],s,t; scanf("%d%d%d%d",&a[0],&a[1],&a[2],a[3]); scanf("%d%d%d%d",&b[0],&b[1],&b[2],b[3]); s=a[0]+a[1]+a[2]+a[3]; t=b[0]+b[1]+b[2]+b[3]; if(s>t) printf("%d\n",s); else printf("%d\n",t); } %d%d%d",&a[0],&a[1],...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:4:9: warning: missing terminating " character 4 | scanf("%d#include <stdio.h> | ^ main.c:4:9: error: missing terminating " character 4 | scanf("%d#include <stdio.h>...
s616540437
p00433
C
#include <stdio.h> main(){ int a[4],b[4],s,t; scanf("%d#include <stdio.h> main(){ int a[4],b[4],s,t; scanf("%d%d%d%d",&a[0],&a[1],&a[2],a[3]); scanf("%d%d%d%d",&b[0],&b[1],&b[2],b[3]); s=a[0]+a[1]+a[2]+a[3]; t=b[0]+b[1]+b[2]+b[3]; if(s>t) printf("%d\n",s); else printf("%d\n",t); } %d%d%d",&a[0],&a[1],...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:4:9: warning: missing terminating " character 4 | scanf("%d#include <stdio.h> | ^ main.c:4:9: error: missing terminating " character 4 | scanf("%d#include <stdio.h>...
s853501561
p00433
C
S[2],i;main(a){for(;~scanf("%d",&a);++i-8||printf("%.f\n",fmax(*S,S[1]))S[i/4]+=a;}
main.c:1:1: warning: data definition has no type or storage class 1 | S[2],i;main(a){for(;~scanf("%d",&a);++i-8||printf("%.f\n",fmax(*S,S[1]))S[i/4]+=a;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'S' [-Wimplicit-int] main.c:1:6: error: type defaults to 'int' in declaration of 'i' [-Wimpl...
s336978959
p00433
C
main(){ int i,a,b,c; for(a=b=i=0;i<8;i++) scanf("%d",&c),i<4?a+=c:b+=c; printf("%d\n",(a>b)?a:b); }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function 'main': main.c:4:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d",&c),i<4?a+=c:b+=c; | ^~~~~ main.c:1:1: note: ...
s636705560
p00433
C
main(i,a,b,c){for(a=b=i=0;i<8;i++)scanf("%d",&c),i<4?a+=c:b+=c;printf("%d\n",(a>b)?a:b);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(i,a,b,c){for(a=b=i=0;i<8;i++)scanf("%d",&c),i<4?a+=c:b+=c;printf("%d\n",(a>b)?a:b);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'a' defaults to 'int' ...
s262795352
p00433
C
int main() { int i , j , in , sum[2] = {0}; for ( i = 0; i < 2; i++ ) { for ( j = 0; j < 4; j++ ) { scanf("%d",&in); sum[i] += in; } } if ( sum[0] => sum[1] ) printf("%d\n",sum[0]); else printf("%d\n",sum[1]); return 0; }
main.c: In function 'main': main.c:6:25: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%d",&in); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | i...
s942205754
p00433
C
#include <stdio.h> int main() { int i=0 , j=0 , in , sum[2]={0}; while ( i < 2 ) { while ( j < 4 ) { scanf("%d",&in); sum[i]+=in; } } if ( sum[0] >= sum[1] ) printf("%d\n",sum[0); else printf("%d\n",sum[1]); return 0; }
main.c: In function 'main': main.c:12:36: error: expected ']' before ')' token 12 | printf("%d\n",sum[0); | ^ | ]
s616328032
p00433
C
#include <stdio.h> int main() { int i=0 , j=0 , in , sum[2]={0}; while ( i < 2 ) { while ( j < 4 ) { scanf("%d",&in); sum[i]+=in; j++; } i++; } if ( sum[0] >= sum[1] ) printf("%d\n",sum[0); else printf("%d\n",sum[1]); return 0; }
main.c: In function 'main': main.c:14:36: error: expected ']' before ')' token 14 | printf("%d\n",sum[0); | ^ | ]
s344992773
p00433
C
#include <stdio.h> int main() { int i=0 , j=0 , in , sum[2]={0}; while ( i < 2 ) { while ( j < 4 ) { scanf("%d",&in); sum[i]+=in; j++; } i++; } if ( sum[0] >= sum[1] ) { printf("%d\n",sum[0); } else { printf("%d\n",sum[1]); } return 0; }
main.c: In function 'main': main.c:14:36: error: expected ']' before ')' token 14 | printf("%d\n",sum[0); | ^ | ]
s119217937
p00433
C
#include <stdio.h> int main(void) { int aone,bone; int asum,bsum; int i; asum=bsum=0; for(i=0;i<4;i++) { scanf("%d"&aone); asum+=aone; } for(i=0;i<4;i++) { scanf("%d",&bone); bsum+=bone; } printf("%d\n",asum>bsum?asum:bsum); return 0; }
main.c: In function 'main': main.c:9:27: error: invalid operands to binary & (have 'char *' and 'int') 9 | scanf("%d"&aone); | ~~~~^ | | | char *
s674856256
p00433
C
#include <iostream> using namespace std; int main() { cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4; atot = a1 + a2 + a3 + a4; btot = b1 + b2 + b3 + b4; if( atot > btot) cout << atot << endl; else cout << btot << endl; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s362774981
p00433
C
//////////////////////////// //情報オリンピック過去問//// //Score //// //AOJ 0510 //// //////////////////////////// /* *設問解説 *情報・数学・理科・英語のAさんBさんの合計得点 *のうち大きい方を出力 *同点の場合は、どちらか片方を出力 */ include<stdio.h> int main(){ int aa,ab,ac,ad; int ba,bb,bc,bd; int asum,bsum,abmax; scanf("%d %d %d %d",&aa,&ab,&ac,&ad); scanf...
main.c:14:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 14 | include<stdio.h> | ^
s193210808
p00433
C
//////////////////////////// //情報オリンピック過去問//// //Score //// //AOJ 0510 //// //////////////////////////// /* *設問解説 *情報・数学・理科・英語のAさんBさんの合計得点 *のうち大きい方を出力 *同点の場合は、どちらか片方を出力 */ include<stdio.h> int main(){ int aa,ab,ac,ad; int ba,bb,bc,bd; int asum,bsum,abmax; scanf("%d %d %d %d",&aa,&ab,&ac,&ad); scanf...
main.c:14:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 14 | include<stdio.h> | ^
s699880015
p00433
C
s[2],i;main(x){for(;~scanf("%d",&t);x=s[i++/4]+=t);i=!printf("%d\n",*s>x?*s:x);}
main.c:1:1: warning: data definition has no type or storage class 1 | s[2],i;main(x){for(;~scanf("%d",&t);x=s[i++/4]+=t);i=!printf("%d\n",*s>x?*s:x);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:6: error: type defaults to 'int' in declaration of 'i' [-Wimplici...
s461942576
p00433
C
s[2],i;main(x){for(;~scanf("%d",&t);x=s[i++/4]+=x);i=!printf("%d\n",*s>x?*s:x);}
main.c:1:1: warning: data definition has no type or storage class 1 | s[2],i;main(x){for(;~scanf("%d",&t);x=s[i++/4]+=x);i=!printf("%d\n",*s>x?*s:x);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:6: error: type defaults to 'int' in declaration of 'i' [-Wimplici...
s022968132
p00433
C
s[2],i;main(x){for(;~scanf("%d",&x);x=s[i++/4]+=x);i=!printf("%.f\n",maxf(*s,x);}
main.c:1:1: warning: data definition has no type or storage class 1 | s[2],i;main(x){for(;~scanf("%d",&x);x=s[i++/4]+=x);i=!printf("%.f\n",maxf(*s,x);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:6: error: type defaults to 'int' in declaration of 'i' [-Wimplic...
s604471494
p00433
C
#include<stdio.h> #include<stdlib.h> int main(){ int a1,b1,c1,d1,a2,b2,c2,d2,s,t; scanf("%d %d %d %d",&a1,&b1,&c1,&d1); scanf("%d %d %d %d",&a2,&b2,&c2,&d2); s=a1+b1+c1+d1; t=a2+b2+c2+d2; if(0>a1 || 0>a2 || 0>a3 || 0>a4 || 0>b1 || 0>b2 || 0>b3 || 0>b4 || 100<a1 || 100<a2 || 100<a3 || 100< a4 || 100<b1 |...
main.c: In function 'main': main.c:13:24: error: 'a3' undeclared (first use in this function); did you mean 'a2'? 13 | if(0>a1 || 0>a2 || 0>a3 || 0>a4 || 0>b1 || 0>b2 || 0>b3 || 0>b4 || 100<a1 || 100<a2 || 100<a3 || 100< a4 || 100<b1 || 100<b2 || 100<b3 || 100<b4){ | ^~ | ...
s533883577
p00433
C
#include<stdio.h> #include<stdlib.h> int main(){ int a1,b1,c1,d1,a2,b2,c2,d2,s,t; scanf("%d %d %d %d",&a1,&b1,&c1,&d1); scanf("%d %d %d %d",&a2,&b2,&c2,&d2); s=a1+b1+c1+d1; t=a2+b2+c2+d2; if(0>a1 || 0>a2 || 0>a3 || 0>a4 || 0>b1 || 0>b2 || 0>b3 || 0>b4 || 100<a1 || 100<a2 || 100<a3 || 100< a4 || 100<b1 |...
main.c: In function 'main': main.c:13:24: error: 'a3' undeclared (first use in this function); did you mean 'a2'? 13 | if(0>a1 || 0>a2 || 0>a3 || 0>a4 || 0>b1 || 0>b2 || 0>b3 || 0>b4 || 100<a1 || 100<a2 || 100<a3 || 100< a4 || 100<b1 || 100<b2 || 100<b3 || 100<b4){ | ^~ | ...
s358648730
p00433
C
#include<stdio.h> #include<stdlib.h> int main(){ int a1,b1,c1,d1,a2,b2,c2,d2,s,t; scanf("%d %d %d %d",&a1,&b1,&c1,&d1); scanf("%d %d %d %d",&a2,&b2,&c2,&d2); s=a1+b1+c1+d1; t=a2+b2+c2+d2; if(0>a1 || 0>a2 || 0>a3 || 0>a4 || 0>b1 || 0>b2 || 0>b3 || 0>b4 || 100<a1 || 100<a2 || 100<a3 || 100< a4 || 100<b1 |...
main.c: In function 'main': main.c:13:24: error: 'a3' undeclared (first use in this function); did you mean 'a2'? 13 | if(0>a1 || 0>a2 || 0>a3 || 0>a4 || 0>b1 || 0>b2 || 0>b3 || 0>b4 || 100<a1 || 100<a2 || 100<a3 || 100< a4 || 100<b1 || 100<b2 || 100<b3 || 100<b4){ | ^~ | ...
s676167369
p00433
C++
#include<stdio.h> int main(void) { int x1,x2,x3,x4,y1,y2,y3,y4,x,y; scanf("%d %d %d %d %d %d %d %d",&x1,&x2,&x3,&x4,&y1,&y2,&y3,&y4) x=x1+x2+x3+x4; y=y1+y2+y3+y4; if(x>y){ printf("d\n",x); } else{ printf("d\n",y); } return 0; }
a.cc: In function 'int main()': a.cc:5:73: error: expected ';' before 'x' 5 | scanf("%d %d %d %d %d %d %d %d",&x1,&x2,&x3,&x4,&y1,&y2,&y3,&y4) | ^ | ; ...
s270582008
p00433
C++
#include<stdio.h> int main(void) { int a1,a2,a3,a4,b1,b2,b3,b4,s,t; scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4); s=a1+a2+a3+a4; t=b1+b2+b3+b4; if(s<=t){ printf("%d\n",t); } else if(t<=s){ printf("%d\n",s); } return 0; }
a.cc:4:9: error: extended character   is not valid in an identifier 4 | int a1,a2,a3,a4,b1,b2,b3,b4,s,t; | ^ a.cc: In function 'int main()': a.cc:4:9: error: 'int\U00003000a1' was not declared in this scope 4 | int a1,a2,a3,a4,b1,b2,b3,b4,s,t; | ^~~~~~~ a.cc:4:17: err...
s819640481
p00433
C++
#include<stdio.h> int main(void) { int a1,a2,a3,a4,b1,b2,b3,b4,s,t; scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4); s=a1+a2+a3+a4; t=b1+b2+b3+b4; if(s<=t){ printf("%d\n",t); } else if(t<=s){ printf("%d\n",s); } return 0; }
a.cc:4:9: error: extended character   is not valid in an identifier 4 | int a1,a2,a3,a4,b1,b2,b3,b4,s,t; | ^ a.cc: In function 'int main()': a.cc:4:9: error: 'int\U00003000a1' was not declared in this scope 4 | int a1,a2,a3,a4,b1,b2,b3,b4,s,t; | ^~~~~~~ a.cc:4:17: err...
s673120418
p00433
C++
#include<stdio.h> int main(void) { int x1,x2,x3,x4,y1,y2,y3,y4,s,t; scanf("%d %d %d %d %d %d %d %d",&x1,&x2,&x3,&x4,&y1,&y2,&y3,&y4); s=x1+x2+x3+x4; t=y1+y2+y3+y4; if(s>t){ printf("d\n",s); } else if(s=t){ pritnf("%d=%d\n",s,t); } else{ printf("d\n",y); } return 0; }
a.cc: In function 'int main()': a.cc:12:17: error: 'pritnf' was not declared in this scope; did you mean 'printf'? 12 | pritnf("%d=%d\n",s,t); | ^~~~~~ | printf a.cc:15:30: error: 'y' was not declared in this scope 15 | printf("d\n",y); ...
s032036531
p00433
C++
#include<stdio.h> int main(void) { int x1,x2,x3,x4,y1,y2,y3,y4,s,t; scanf("%d %d %d %d %d %d %d %d",&x1,&x2,&x3,&x4,&y1,&y2,&y3,&y4); s=x1+x2+x3+x4; t=y1+y2+y3+y4; if(s>t){ printf("d\n",s); } else if(s==t){ pritnf("%d=%d\n",s,t); } else{ printf("d\n",y); } return 0; }
a.cc: In function 'int main()': a.cc:12:17: error: 'pritnf' was not declared in this scope; did you mean 'printf'? 12 | pritnf("%d=%d\n",s,t); | ^~~~~~ | printf a.cc:15:30: error: 'y' was not declared in this scope 15 | printf("d\n",y); ...
s042192235
p00433
C++
#include<stdio.h> int main(void) { int a1,a2,a3,a4,b1,b2,b3,b4,s,t; scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4); s=a1+a2+a3+a4; t=b1+b2+b3+b4; if(s<t){ printf("%d\n",t); } else if(t<s){ printf("%d\n",s); } else if(s==t){ printf("%d\n",s); } return 0; }
a.cc:4:9: error: extended character   is not valid in an identifier 4 | int a1,a2,a3,a4,b1,b2,b3,b4,s,t; | ^ a.cc: In function 'int main()': a.cc:4:9: error: 'int\U00003000a1' was not declared in this scope 4 | int a1,a2,a3,a4,b1,b2,b3,b4,s,t; | ^~~~~~~ a.cc:4:17: err...
s236680015
p00433
C++
#include<bits/stdc++.h> typedef long long ll; using namespace std; int main() { int a[2] = { 0 }; for (i = 0; i < 2; i++) { int a, b, c, d; cin >> a >> b >> c >> d; a[i] += a + b + c + d; } cout << max(a[0], a[1]) << endl; }
a.cc: In function 'int main()': a.cc:6:14: error: 'i' was not declared in this scope 6 | for (i = 0; i < 2; i++) { | ^
s700442185
p00433
C++
#include<bits/stdc++.h> typedef long long ll; using namespace std; int main() { int a[2] = { 0 }; for (int i = 0; i < 2; i++) { int a, b, c, d; cin >> a >> b >> c >> d; a[i] += a + b + c + d; } cout << max(a[0], a[1]) << endl; }
a.cc: In function 'int main()': a.cc:9:18: error: invalid types 'int[int]' for array subscript 9 | a[i] += a + b + c + d; | ^
s761823675
p00433
C++
#include<bits/stdc++.h> typedef long long ll; using namespace std; int main() { int a[2] = { 0 }; for (int i = 0; i < 2; i++) { int a, b, c, d; cin >> a >> b >> c >> d; a[i] += (a + b + c + d); } cout << max(a[0], a[1]) << endl; }
a.cc: In function 'int main()': a.cc:9:18: error: invalid types 'int[int]' for array subscript 9 | a[i] += (a + b + c + d); | ^
s417417734
p00433
C++
using namespace std; int main(){ int answer; int s = 0, t = 0; int ibuf; for (int i = 0; i < 4; i++) { cin >> ibuf; s += ibuf; } for (int i = 0; i < 4; i++) { cin >> ibuf; t += ibuf; } answer = max(s, t); cout << answer << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:17: error: 'cin' was not declared in this scope 11 | cin >> ibuf; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namesp...
s075186605
p00433
C++
#include<iostream> using namespace std; int sum1=0,sum2=0; for(int i=0;i<4;i++){ cin>>a; sum1+=a; } for(int i=0;i<4;i++){ cin>>a; sum2+=sum2; } if(sum1>sum2)cout<<sum1; else if(sum1<sum2)cout<<sum2; else cout<<sum1; return 0; }
a.cc:4:9: error: expected unqualified-id before 'for' 4 | for(int i=0;i<4;i++){ | ^~~ a.cc:4:21: error: 'i' does not name a type 4 | for(int i=0;i<4;i++){ | ^ a.cc:4:25: error: 'i' does not name a type 4 | for(int i=0;i<4;i++){ | ...
s504774445
p00433
C++
#include<iostream> using namespace std; int main(){ int sum1=0,sum2=0; for(int i=0;i<4;i++){ cin>>a; sum1+=a; } for(int i=0;i<4;i++){ cin>>a; sum2+=sum2; } if(sum1>sum2)cout<<sum1; else if(sum1<sum2)cout<<sum2; else cout<<sum1; return 0; }
a.cc: In function 'int main()': a.cc:6:14: error: 'a' was not declared in this scope 6 | cin>>a; | ^ a.cc:10:14: error: 'a' was not declared in this scope 10 | cin>>a; | ^
s945478939
p00433
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { int ans = 0; for(int i=0;i<2;i++){ int sum=0; for(int j=0;j<4;j++){ Scanner stdIn = new Scanner(System.in); int p = stdIn.nextInt(); sum += p; } ans = Math.max(sum, ans); } System.out.println(ans); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s204790266
p00433
C++
#include <iostream> #include <algorithm> using namespace std; int main() { int a[8]; for (int i=0; i<8; ++i) cin >> a[i]; cout << max(accumulate(a, a+4, 0), accumulate(a+4, a+8, 0)) << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:17: error: 'accumulate' was not declared in this scope 9 | cout << max(accumulate(a, a+4, 0), accumulate(a+4, a+8, 0)) << endl; | ^~~~~~~~~~
s562459058
p00433
C++
#include<iostream> #include<algorhithm> using namespace std; int main { int A,B,a,b for(i=0;i<4;i++) { cin << a; A += a; } for(i=0;i<4;i++) { cin << b; B += b; } A>B? cout << A : cout << B; }
a.cc:2:9: fatal error: algorhithm: No such file or directory 2 | #include<algorhithm> | ^~~~~~~~~~~~ compilation terminated.
s467754287
p00433
C++
#include<iostream> using namespace std; int main { int A,B,a,b for(i=0;i<4;i++) { cin << a; A += a; } for(i=0;i<4;i++) { cin << b; B += b; } A>B? cout << A : cout << B; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main { | ^~~~ a.cc:5:5: error: expected primary-expression before 'int' 5 | int A,B,a,b | ^~~ a.cc:5:5: error: expected '}' before 'int' a.cc:4:10: note: to match this '{' 4 | int main { | ^ a.cc:...
s918425202
p00433
C++
#include<iostream> using namespace std; int main { int S,T,a,b; for(i=0;i<4;i++) { cin << a; S += a; } for(i=0;i<4;i++) { cin << b; T += b; } S>T? cout << S : cout << T; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main { | ^~~~ a.cc:5:5: error: expected primary-expression before 'int' 5 | int S,T,a,b; | ^~~ a.cc:5:5: error: expected '}' before 'int' a.cc:4:10: note: to match this '{' 4 | int main { | ^ a.cc...
s432724306
p00433
C++
#include<iostream> using namespace std; int main { int S,T,a,b,i; for(i=0;i<4;i++) { cin << a; S += a; } for(i=0;i<4;i++) { cin << b; T += b; } S>T ? cout << S : cout << T; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main { | ^~~~ a.cc:5:5: error: expected primary-expression before 'int' 5 | int S,T,a,b,i; | ^~~ a.cc:5:5: error: expected '}' before 'int' a.cc:4:10: note: to match this '{' 4 | int main { | ^ a....