submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s485358625
p03826
C++
include<iostream> using namespace std; int main(){ x=a*b,y=c*d; if x>=y cout<<x<<endl; else cout<<y<<endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:4:3: error: 'x' was not declared in this scope 4 | x=a*b,y=c*d; | ^ a.cc:4:5: error: 'a' was not declared in this scope 4 | x=a*b,y=c*d; | ^ a.cc:4:7: error: 'b' w...
s239184153
p03826
Java
import java.util.*; import java.util.Collections; public class Main { public static void main(String[] args) { // Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int D = sc.nextInt(); System.out.println(Math.max(A * B, C * D)); } }
Main.java:7: error: cannot find symbol int A = sc.nextInt(); ^ symbol: variable sc location: class Main Main.java:8: error: cannot find symbol int B = sc.nextInt(); ^ symbol: variable sc location: class Main Main.java:9: error: cannot find symbol int C = sc.nextInt(); ...
s033074608
p03826
C++
#include<bits/stdc++> using namespace std; int main(){ int A,B,C,D; cin>>A>>B>>C>>D; cout<<max(A*B,C*D)<<endl; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s024074844
p03826
C
#include<stdio.h> int main(void){ int a,b,c,d; scanf("%d %d %d %d",&a,&b,&c,&d); if(a*b<c*d){ printf("%d",c*d); } else{ prinf("%d",a*b); } return 0; }
main.c: In function 'main': main.c:9:5: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration] 9 | prinf("%d",a*b); | ^~~~~ | printf
s343754261
p03826
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; typedef long long ll; typedef long double ld; const int inf=1e9+7; const ll longinf=1LL<<60; #define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i ) #define rep(i,n) REP(i,0,n) #define F first #define S second const int mx=100010; const ll mo...
a.cc: In function 'int main()': a.cc:18:3: error: expected initializer before 'cin' 18 | cin >> a >> b >> c >> d; | ^~~ a.cc:19:21: error: 'd' was not declared in this scope 19 | cout << max(a*b,c*d) << endl; | ^
s140532837
p03826
C++
#include <iostream> #include <string> int main() { int a,b,c,d; cin a>>b>>c>>d; if(a*b > c*d){ std::cout<<a*b; }else{ std::cout<<c*d; } }
a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin a>>b>>c>>d; | ^~~ | 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 ...
s217959132
p03826
C++
#include <iostream> #include <string> int main() { int a,b,c,d; cin a>>b>>c>>d; if(a*b > c*d){ std::cout<<a*b; }else{ atd::cout<<c*d; } }
a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin a>>b>>c>>d; | ^~~ | 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 ...
s518645259
p03826
Java
import java.util.Scanner; public class Abc052A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); if (a * b > c * d) { System.out.println(a * b); } else { Syst...
Main.java:3: error: class Abc052A is public, should be declared in a file named Abc052A.java public class Abc052A { ^ 1 error
s175103436
p03826
C
#include #include int main() { int a,b,c,e; while(~scanf("%d %d %d %d",&a,&b,&c,&e)) { if(a*b>=c*e) printf("%d\n",a*b); else printf("%d\n",c*e); } }
main.c:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ main.c:2:9: error: #include expects "FILENAME" or <FILENAME> 2 | #include | ^ main.c: In function 'main': main.c:7:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 7 ...
s691798114
p03826
C
#include #include int main() { int a,b,c,e; while(~scanf("%d %d %d %d",&a,&b,&c,&e)) { if(ab>=ce) printf("%d\n",ab); else printf("%d\n",ce); } }
main.c:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ main.c:2:9: error: #include expects "FILENAME" or <FILENAME> 2 | #include | ^ main.c: In function 'main': main.c:7:8: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 7 ...
s059032986
p03826
C++
#include<bits/stdc++.h> using namespace std; int main() { long long int a,b,c,d; cin>>a>>b>>c>>d; a1=a*b; a2=c*d; if(a1>a2) { cout<<a1<<endl; } else if(a2>a1) { cout<<a2<<endl; } else { cout<<a1<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'a1' was not declared in this scope; did you mean 'a'? 7 | a1=a*b; | ^~ | a a.cc:8:5: error: 'a2' was not declared in this scope; did you mean 'a'? 8 | a2=c*d; | ^~ | a
s783829906
p03826
C++
#include<bits/stdc++.h> using namespace std; int main() { long long int a,b,c,d; cin>>a>>b>>c>>d; a1=a*b; a2=c*d; if(a1>a2) { cout<<a1<<endl; } else { cout<<a2<<endl; } }
a.cc: In function 'int main()': a.cc:7:5: error: 'a1' was not declared in this scope; did you mean 'a'? 7 | a1=a*b; | ^~ | a a.cc:8:5: error: 'a2' was not declared in this scope; did you mean 'a'? 8 | a2=c*d; | ^~ | a
s724908249
p03826
C++
#include<bits/stdc++.h> using namespace std; int main() { long long int a,b,c,d; cin>>a>>b>>c>>d; a1=a*b; a2=c*d; if(a1>a2) { cout<<a1<<endl; } else { cout<<a2<<endl; } }
a.cc: In function 'int main()': a.cc:7:5: error: 'a1' was not declared in this scope; did you mean 'a'? 7 | a1=a*b; | ^~ | a a.cc:8:5: error: 'a2' was not declared in this scope; did you mean 'a'? 8 | a2=c*d; | ^~ | a
s014394188
p03826
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(long long (i)=0;(i)<(n);(i)++) #define ll long long #define pr_qu priority_queue #define vec(name,size,common) vector<ll> (name)((size),(common)) int main(){ int a,b,c,d; cin>>a>>b>>c>>d; a = a*b; c = c*d; if(a>=c){ cout<<a; ...
a.cc: In function 'int main()': a.cc:21:12: error: expected ';' before '}' token 21 | cout<<c | ^ | ; 22 | } | ~
s684399713
p03826
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; int rectangle1 = a * b; int rectangle2 = c * d; if (rectangle1 == rectangle2) cout << rectangle1; else (rectangle1 > rectangle2 ? rectangle1 : rectangle2) << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:57: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 14 | (rectangle1 > rectangle2 ? rectangle1 : rectangle2) << endl; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
s462667560
p03826
C++
#include <iostream> using namespace std; int main() { int a,b,c,d; cin>>a>>b>>c>>d ; if(a*b>=c*d){cout<<a*b ;} else {cout<<c*d ;} return 0; } 0
a.cc:13:1: error: expected unqualified-id before numeric constant 13 | 0 | ^
s533615943
p03826
C++
#include <bits/stdc++.h> #define rep(i,m,n) for(int i=m; i<n; i++) #define co(n) cout << n << endl using namespace std; int main(){ int a, b, c, d; cin >> a >> b >> c >> d; if(a*b>c*d) co(a*b); else so(c*d); return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: 'so' was not declared in this scope; did you mean 'co'? 9 | else so(c*d); | ^~ | co
s873467166
p03826
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); int ab = a * b; int cd = c * d; if (ab = cd) { System.out.pr...
Main.java:14: error: incompatible types: int cannot be converted to boolean if (ab = cd) { ^ 1 error
s765461223
p03826
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); int ab = a * b; int cd = c * d; if (ad = cd) { System.out.pr...
Main.java:14: error: cannot find symbol if (ad = cd) { ^ symbol: variable ad location: class Main 1 error
s906087569
p03826
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); int ab = a * b; int cd = c * d; if (ad = cd) { System.out.pr...
Main.java:14: error: cannot find symbol if (ad = cd) { ^ symbol: variable ad location: class Main Main.java:16: error: cannot find symbol } else if (ad > cd) { ^ symbol: variable ad location: class Main Main.java:18: error: cannot find symbol } else if (cd > ad) { ...
s757319169
p03826
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); int ab = a * b; int cd = c * d; if (ad = cd) { System.out.pr...
Main.java:14: error: cannot find symbol if (ad = cd) { ^ symbol: variable ad location: class Main Main.java:15: error: cannot find symbol System.out.println(ad); ^ symbol: variable ad location: class Main Main.java:16: error: cannot find symbol } else if (ad > ...
s058397484
p03826
C++
#include <iostream> #include <string> using namespace std; int main() { cin >> a >> b >> c >> d; if (a * b > c * d) { cout << a * b; } else { cout << c * d; } }
a.cc: In function 'int main()': a.cc:7:12: error: 'a' was not declared in this scope 7 | cin >> a >> b >> c >> d; | ^ a.cc:7:17: error: 'b' was not declared in this scope 7 | cin >> a >> b >> c >> d; | ^ a.cc:7:22: error: 'c' was not declared in this scope 7 | ...
s728227276
p03826
C++
a,b,c,d = map(int,input().split()) print(max(a*b,c*d))
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c,d = map(int,input().split()) | ^
s440328185
p03826
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B,C,D; cin >> A >> B >> C >> D; cout << max(a*B,C*D) << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: 'a' was not declared in this scope 7 | cout << max(a*B,C*D) << endl; | ^
s793631835
p03826
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()); int c = Integer.parseInt(sc.next()); int d = Integer.parseInt(sc.next()); ...
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:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s419210454
p03826
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ int a,b,c,d; cin >> a >> b >> c >> d; //if(x=='a'||x=='i'||x=='u'||x=='e'||x=='o')){cout << "vowel" << endl;} //else{cout << "consonant" << endl;} int x = a*b; int y = c*d; if(x<y){cout << y <<...
a.cc: In function 'int main()': a.cc:15:12: error: expected '}' at end of input 15 | return 0; | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s434703186
p03826
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ int a,b,c,d; cin >> a >> b >> c >> d; //if(x=='a'||x=='i'||x=='u'||x=='e'||x=='o')){cout << "vowel" << endl;} //else{cout << "consonant" << endl;} int x = a*b; int y = c*d; if(x<y){cout << y <<...
a.cc: In function 'int main()': a.cc:13:25: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 13 | else if(y<x){cout < x << endl;} | ~~^~~~~~~
s300607463
p03826
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B,C,D; cin >> A >> B >> C >> D; if(A * B < C * D) cout << C * D << endl; if(A * B => C * D) cout << A * B << endl; }
a.cc: In function 'int main()': a.cc:8:13: error: expected primary-expression before '>' token 8 | if(A * B => C * D) cout << A * B << endl; | ^
s222102706
p03826
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s; cin >> s; int cnt = 0; vector<int> a(n); if(s.at(0) == 'I'){ a.at(0) = 1; } else { a.at(0) = -1; } for(int i=1;i<n;i++){ if(s.at(i) == 'I'){ a.at(i) = a.at(i-1) +1; } else { ...
a.cc: In function 'int main()': a.cc:26:13: error: expected unqualified-id before '(' token 26 | cout << a.(n-1) << endl; | ^
s634790106
p03826
C++
#include <bits/stdc.h> using namespace std; int main() { int a,b,c,d; cin >> a >> b >> c >> d; int ans = max(a*b,c*d); cout << ans << endl; return 0; }
a.cc:1:10: fatal error: bits/stdc.h: No such file or directory 1 | #include <bits/stdc.h> | ^~~~~~~~~~~~~ compilation terminated.
s564145500
p03826
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; int ans=max(a*b, c*d) cout << ans << endl; }
a.cc: In function 'int main()': a.cc:10:3: error: expected ',' or ';' before 'cout' 10 | cout << ans << endl; | ^~~~
s661662229
p03826
C++
#include <bits/stdc++.h> using namespace std; int A, B, C, D; int main () { cin >> A >> B >> C >> D; if (A*B=C*D) { cout << A*B << endl; } else if (A*B>C*D) { cout << A*B << endl; } else { cout << C*D << endl; } }
a.cc: In function 'int main()': a.cc:8:14: error: lvalue required as left operand of assignment 8 | if (A*B=C*D) { | ~^~
s207450772
p03826
C++
#include <bits/stdc++.h> using namespace std; int a, b, c, d; int main () { cin >> a >> b >> c >> d; if (a*b=c*d) { cout << a*b << endl; } else if (a*b>c*d) { cout << a*b << endl; } else { cout << c*d << endl; } }
a.cc: In function 'int main()': a.cc:8:14: error: lvalue required as left operand of assignment 8 | if (a*b=c*d) { | ~^~
s542547611
p03826
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main() { int a, b, c, d; cin >> a >> b >> c >> d; cout >> max(a*b, c*d) << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const int') 9 | cout >> max(a*b, c*d) << endl; | ~~~~ ^~ ~~~~~~~~~~~~~ | | | | | const int | std::ostream {aka std::b...
s832879065
p03826
C
#include<stdio.h> int main() { int a, b, c, d; scanf("%d %d %d %d ", &a, &b, &c, &d); if ((a*b) >= (c*d)) { printf("%d", a*b) } else { printf("%d", c*d) } return 0; }
main.c: In function 'main': main.c:11:23: error: expected ';' before '}' token 11 | printf("%d", a*b) | ^ | ; 12 | } | ~ main.c:15:23: error: expected ';' before '}' token 15 | printf("%d", c*d) | ...
s428111905
p03826
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin a >> b >> c >> d; cout << max(a*b, c*d) << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'a' 6 | cin a >> b >> c >> d; | ^~ | ;
s933998815
p03826
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin a >> b >> c >> d; cout << max(a*b, c*d) << endl: return 0; }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'a' 6 | cin a >> b >> c >> d; | ^~ | ; a.cc:7:32: error: expected ';' before ':' token 7 | cout << max(a*b, c*d) << endl: | ^ | ;
s975224497
p03826
C
#include<iostream> using namespace std; int main(){ int a,b,c,d; cin >> a >> b >> c >> d; if(a*b >= c*d) cout << a*b << endl; else cout << c*d << endl; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s041372365
p03826
C++
#include<iostream> int main(){ int a, b, c, d; cin >> a >> b >> c >> d; if(a*b > c*d) cout << a*b; else cout << c*d; return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin >> a >> b >> c >> d; | ^~~ | 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; ///...
s901180345
p03826
C++
#include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; const int INF = 1e9; //long long using ll = long long; //出力系 #define print(x) cout << x << endl #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl // begin() en...
a.cc: In function 'int main()': a.cc:58:20: error: expected ';' before 'l' 58 | else print ("BS")l | ^ a.cc:60:2: error: expected '}' at end of input 60 | } | ^ a.cc:46:12: note: to match this '{' 46 | int main() { | ^
s823742105
p03826
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C,D; cin >> A >> B >> C >> D; int a=A*B,b=C*D if (a>b){ cout << a << endl; } else { cout << b << endl; } }
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'if' 8 | if (a>b){ | ^~ a.cc:11:3: error: 'else' without a previous 'if' 11 | else { | ^~~~
s700692382
p03826
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int N=sc.nextInt(); String s=sc.next(); int x=0; int max=0; for(int i=0; i<N; i++){ if(s.charAt(i).equals('I')){ x++; }else{ x--; } if(max<x){...
Main.java:12: error: char cannot be dereferenced if(s.charAt(i).equals('I')){ ^ 1 error
s039632700
p03826
C++
a, b, c, d = gets.split.map(&:to_i) puts [a * b, c * d].max
a.cc:1:1: error: 'a' does not name a type 1 | a, b, c, d = gets.split.map(&:to_i) | ^
s111541276
p03826
C++
#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a, b, c d; cin >> a >> b >> c >> d; (a * c >= b*d) ? cout << a*c << "\n" : cout << b*d << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: expected initializer before 'd' 8 | int a, b, c d; | ^ a.cc:9:18: error: 'c' was not declared in this scope 9 | cin >> a >> b >> c >> d; | ^ a.cc:9:23: error: 'd' was not declared in this scope 9 | cin >> a >> b >> c ...
s692643889
p03826
C
#include<stdio.h> int main() { int A,B,C,D; scanf("%d %d %d %d",&A,&B,&C,&D); int area1,area2; area1=A*B; area2=C*D; if(area1>area2) { printf("%d",area1); } if(area1==area2) { int h=area1|area2 printf("%d",h); } return 0; }
main.c: In function 'main': main.c:16:10: error: expected ',' or ';' before 'printf' 16 | printf("%d",h); | ^~~~~~
s787644933
p03826
C++
#include <iostream> #include <list> #include <vector> #include <string> #include <cmath> #include <algorithm> typedef long long ll; using namespace std; int main(){ int A, B, C, D; cin >> A >> B >> C >> D; int S1 = A * B; int S2 = C * D; int ans = 0; if (S1 >= S2) { ans = S1; } ...
a.cc: In function 'int main()': a.cc:24:11: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<' 24 | count << ans; | ~~~~~~^~~~~~
s215361131
p03826
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ double A,B,C,D; long long space1,space2; cin>>A>>B>>C>>D; space1=A*B; space2=C*D; if(space1==space2) printf("%lld",space1); else if(space1>space2) printf("%lld",space1); else if(space2>space1) printf("%lld",space2); return0;}
a.cc: In function 'int main()': a.cc:16:1: error: 'return0' was not declared in this scope 16 | return0;} | ^~~~~~~
s560615099
p03826
C++
#include<stdio.h> int main() { int A,B,C,D; int area1,area2; printf("Enter a value for A,B,C and D\n"); scanf("%d%d%d%d",&A,&B,&C,&D); while(0<=a<=10^4 && 0<=b<=10^4 && 0<=c<=10^4 && 0<=d<=10^4){ area1=A*B; area2=C*D; if(area1==area2) { printf("%d ",area1); break; } else if(area1>area2) { p...
a.cc: In function 'int main()': a.cc:8:18: error: 'a' was not declared in this scope 8 | while(0<=a<=10^4 && 0<=b<=10^4 && 0<=c<=10^4 && 0<=d<=10^4){ | ^ a.cc:8:32: error: 'b' was not declared in this scope 8 | while(0<=a<=10^4 && 0<=b<=10^4 && 0<=c<=10^4 && 0<=d<=10^4){ ...
s812915707
p03826
C++
#include<stdio.h> #include<iostream> using namespace std; int main() { int a,b,c,d; int area1,area2; scanf("%d%d%d%d",&a,&b,&c,&d); while(0<=a<=10^4 && 0<=b<=10^4 && 0<=c<=10^4 && 0<=d<=10^4){ area1=a*b; area2=c*d; if(area1==area2) printf("%d ",area1); break; else if(area1>area2) cout<<"...
a.cc: In function 'int main()': a.cc:17:25: error: 'else' without a previous 'if' 17 | else if(area1>area2) | ^~~~ a.cc:22:33: error: 'else' without a previous 'if' 22 | else | ^~~~
s545485215
p03826
C++
#include<stdio.h> #include<iostream> using namespace std; int main() { int a,b,c,d; int area1,area2; printf("Enter a value for A,B,C and D\n"); scanf("%d%d%d%d",&a,&b,&c,&d); while(0<=a<=10^4 && 0<=b<=10^4 && 0<=c<=10^4 && 0<=d<=10^4){ area1=a*b; area2=c*d; if(area1==area2) printf("%d ",area1); bre...
a.cc: In function 'int main()': a.cc:18:25: error: 'else' without a previous 'if' 18 | else if(area1>area2) | ^~~~ a.cc:23:33: error: 'else' without a previous 'if' 23 | else | ^~~~
s484016561
p03826
C++
#include <iostream> using namespace std; int main() { int area1; int area2; int A,B,C,D; cin>>A>>B>>C>>D; area1=A*B; area2=C*D; if(area1>area2) cout<<"the large area="<<area1; else if(area2>area1) cout<<"the large area="<<area2; else (area1==area2) cout<<area1; }
a.cc: In function 'int main()': a.cc:17:24: error: expected ';' before 'cout' 17 | else (area1==area2) | ^ | ; 18 | cout<<area1; | ~~~~
s290637068
p03826
C++
#include <iostream> using namespace std; int main(){ int A,B,C,D,x,y; cin>>A>>B>>C>>D; x=A*B; y=C*D; if(x>y) cout<<x; else if(x<y) cout<<y; else cout<<z; }
a.cc: In function 'int main()': a.cc:13:7: error: 'z' was not declared in this scope 13 | cout<<z; | ^
s484535992
p03826
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B,C,D; cin>>A>>B>>C>>D; if((A*B)>=(B*D)) {court<<A*B; }else {cout<<C*D; }}
a.cc: In function 'int main()': a.cc:7:2: error: 'court' was not declared in this scope 7 | {court<<A*B; | ^~~~~
s346963677
p03826
C++
#include <iostream> using namespace std; int main(){ int A,B,C,D; scanf("%d%d%d%d",&A,&B,&C,&D); if((A*B)>=(B*D)) {printf("%d",(A*B)); } else { printf("%d"),(C*D)); } return 0; }
a.cc: In function 'int main()': a.cc:11:19: error: expected ';' before ')' token 11 | printf("%d"),(C*D)); | ^ | ;
s822186915
p03826
C++
#include <iostream> using namespace std; int main(){ int s,k; cin>>k>>s; for(int x=0;x<=k;x++) { for(int y=0;y<=k;y++) { int z=s-(x+y); if((z>=0)&&(z<=k){ count ++; }}}} cout<<count; return 0; }
a.cc: In function 'int main()': a.cc:12:18: error: expected ')' before '{' token 12 | if((z>=0)&&(z<=k){ | ~ ^ | ) a.cc:14:2: error: expected primary-expression before '}' token 14 | }}}} | ^ a.cc: At global scope: a.cc:15:1: error: 'cout' does not name a type ...
s179290493
p03826
C++
#include<iostream> using namespace std; int main() { int a,b,c,d,r1,r2; cin>>a>>b>>c>>d;r1=a*b;r2=c*d; if(r1>r2) cout<<r1; else if(r2>r1) cout<<r2; else cout<<r1; return 0;
a.cc: In function 'int main()': a.cc:13:10: error: expected '}' at end of input 13 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s843102279
p03826
C++
using namespace std; int main() { int a,b,c,d,a1,a2; scanf("%d%d%d%d" , &a,&b,&c,&d) ; a1= a*b; a2=c*d; if ( a1 >= a2 ) { printf("%d" , a1 ) ; } else { printf("%d" , a2) ; } return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'scanf' was not declared in this scope 6 | scanf("%d%d%d%d" , &a,&b,&c,&d) ; | ^~~~~ a.cc:13:2: error: 'printf' was not declared in this scope 13 | printf("%d" , a1 ) ; | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probab...
s002787013
p03826
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; scanf("%d%d%d%d",&a,&B,&c,&d); int a1=a*b; int a2=c*d; if(a1>a2) printf("%d",a1); else printf("%d",a2); }
a.cc: In function 'int main()': a.cc:5:24: error: 'B' was not declared in this scope 5 | scanf("%d%d%d%d",&a,&B,&c,&d); | ^
s260000220
p03826
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; scanf("%d%d%d%d",&a,&B,&c,&d); int a1=a*b; int a2=c*d; if(a1>a2){ printf("%d",a1); } else{ printf("%d",a2); } }
a.cc: In function 'int main()': a.cc:5:24: error: 'B' was not declared in this scope 5 | scanf("%d%d%d%d",&a,&B,&c,&d); | ^
s266830682
p03826
C++
#include <bits/stdc++.h> #include <stdio.h> #include<iostream> #include<cstdio> #include<bitset> #include<algorithm> #include<vector> #include<list> #include<queue> #include<stack> #include<string> #include<string.h> #include<cmath> #include<utility> #include<functional> #include<map> #include<set> #include<cctype> #in...
a.cc: In function 'int main()': a.cc:216:10: error: conflicting declaration 'std::string c' 216 | string c; | ^ a.cc:215:10: note: previous declaration as 'll c' 215 | ll a,b,c,d; | ^ a.cc: In function 'constexpr ll max(ll, ll)': a.cc:77:1: warning: control reaches end of non-void ...
s327386551
p03826
C
#include<stdio.h> int main(void) { fgets(str,sizeof(str),stdin); sscanf(str,"%d%d%d%d",&a,&b,&c,&d); if((a*b) > (c*d)) { printf("%d\n",a*b); } else { printf("%d\n",c*d); } return 0; }
main.c: In function 'main': main.c:4:9: error: 'str' undeclared (first use in this function) 4 | fgets(str,sizeof(str),stdin); | ^~~ main.c:4:9: note: each undeclared identifier is reported only once for each function it appears in main.c:5:26: error: 'a' undeclared (first use in this function) ...
s940710779
p03826
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); i++) #define rep1(i,n) for (int i = 1; i <= (n); i++) #define repi(i,a,b) for (int i = (a); i < (b); i++) #define all(x) (x).begin(),(x).end() using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; using vi...
a.cc: In function 'int main()': a.cc:21:15: error: 'AB' was not declared in this scope; did you mean 'B'? 21 | cout << max(AB,CD) << endl; | ^~ | B a.cc:21:18: error: 'CD' was not declared in this scope; did you mean 'D'? 21 | cout << max(AB,CD) << endl; | ...
s489182872
p03826
C++
#include<iostream> #include<cmath> #include<string> #include<vector> #include<numeric> using namespace std; int main(){ int a,b,c,d; cin >> a >> b >> c >> d; long double sum1 = a * b; long double sum2 = c * d; if(sum1 > sum2){ ┊ cout << sum1; }else{ ┊ cout << sum2; } return 0; }
a.cc:13:3: error: extended character ┊ is not valid in an identifier 13 | ┊ cout << sum1; | ^ a.cc:15:3: error: extended character ┊ is not valid in an identifier 15 | ┊ cout << sum2; | ^ a.cc: In function 'int main()': a.cc:13:3: error: '\U0000250a' was not declared in this scope 13 | ┊ ...
s769756540
p03826
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Integer A = Integer.parseInt(sc.next()); Integer B = Integer.parseInt(sc.next()); Integer C = Integer.parseInt(sc.next()); Integer D = Integer.parseInt(sc.next()); int ...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s105558795
p03826
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <array> #include <cfloat> using namespace std; int main (){ int a,b,c,d; cin >> a>>b>>c>>d; if(a*b<c*d){ cout >> c*d; }else if(c*d<a*b){ cout >> a*b; }else{ cout << a*b; } }
a.cc: In function 'int main()': a.cc:12:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 12 | cout >> c*d; | ~~~~ ^~ ~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:12:10: ...
s214487527
p03826
C++
#!/usr/bin/env python3 def main(): line = input() (sA, sB, sC, sD) = line.split() A = int(sA) B = int(sB) C = int(sC) D = int(sD) area1 = A * B area2 = C * D if area1 > area2: answer = area1 else: answer = area2 print(answer) main()
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python3 | ^ a.cc:3:1: error: 'def' does not name a type 3 | def main(): | ^~~
s840321604
p03826
C++
a, b, c, d = map(int, input().split()) print(max(a*b, c*d))
a.cc:1:1: error: 'a' does not name a type 1 | a, b, c, d = map(int, input().split()) | ^
s833922194
p03826
C++
#include<stdio.h> int main(void) { int a,b,c,d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); s=a*b; k=c*d; if(s>k) { printf("%d\n",s); } if(s<k) { printf("%d\n",k); } if(s==k) { printf("%d\n",k); } return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 's' was not declared in this scope 9 | s=a*b; | ^ a.cc:10:9: error: 'k' was not declared in this scope 10 | k=c*d; | ^
s011424437
p03826
C++
#include<iostream> using namespace std; int main(void){ int A,B,C,D,men1,men2; cin>>A>>B>>C>>D; men1=A*B; men2=C*D; if(men1<men2){ cout<<men2; } else{ cout<<men1 } return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: expected ';' before '}' token 13 | cout<<men1 | ^ | ; 14 | } | ~
s276715586
p03826
C++
#include<iostream> #include<algorithm> int main(){ int a,b,c,d;cin>>a>>b>>c>>d; cout<<max({a*b,c*d}); }
a.cc: In function 'int main()': a.cc:4:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | int a,b,c,d;cin>>a>>b>>c>>d; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | exte...
s869582467
p03826
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin>> a >> b >> c >> d; if(a*b > c*d){ cout<< a*b<<endl; }else if (a*b < c*d){ cout << c*d<< endl; }else if (a*b = c*d){ cout<< a*b<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:14: error: lvalue required as left operand of assignment 11 | }else if (a*b = c*d){ | ~^~
s131177196
p03826
C++
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <vector> #include <utility> #include <cstring> #include <iomanip> #include <numeric> #include <cmath> #include <queue> using namespace std; typedef long long ll; const int INF = 1<<30; const int MOD = 1e9 + 7; int main() { cin...
a.cc: In function 'int main()': a.cc:21:15: error: expected primary-expression before '.' token 21 | cin>>n>>m>.a>>b; | ^
s401638967
p03826
C++
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <vector> #include <utility> #include <cstring> #include <iomanip> #include <numeric> #include <cmath> #include <queue> using namespace std; typedef long long ll; const int INF = 1<<30; const int MOD = 1e9 + 7; int main() { cin...
a.cc: In function 'int main()': a.cc:21:15: error: expected primary-expression before '.' token 21 | cin>>n>>m>.a>>b; | ^
s924105836
p03826
C++
#include <iostream> using namespace std; int main(){ int A,B,C,D; cin >> A >> B >> C >> D; area1 = A*B; area2 = C*D; if (area1>area2){ cout << area1; } else cout << area2; }
a.cc: In function 'int main()': a.cc:7:3: error: 'area1' was not declared in this scope 7 | area1 = A*B; | ^~~~~ a.cc:8:3: error: 'area2' was not declared in this scope 8 | area2 = C*D; | ^~~~~
s770528957
p03826
C++
#include <iostream> usinfg namespace std; int main(){ int A,B,C,D; cin >> A >> B >> C >> D; area1 = A*B; area2 = C*D; if (area1>area2){ cout << area1; } else cout << area2; }
a.cc:2:1: error: 'usinfg' does not name a type 2 | usinfg namespace std; | ^~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> A >> B >> C >> D; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/1...
s090122394
p03826
C++
#include <iostream> usinfg namesoace std; int main(){ int A,B,C,D; cin >> A >> B >> C >> D; area1 = A*B; area2 = C*D; if (area1>area2){ cout << area1; } else cout << area2; }
a.cc:2:1: error: 'usinfg' does not name a type 2 | usinfg namesoace std; | ^~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> A >> B >> C >> D; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/1...
s021829795
p03826
C++
using namespace std; int main() { int A, B, C, D; cin >> A >> B >> C >> D; cout << max(A*B, C*D) << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> A >> B >> C >> D; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:6:3:...
s540937228
p03826
C++
#include<bits/stdc++.h> using namespace std; int main(void){ string s(19); cin>>s; s.at(5)=' '; s.at(13)=' '; cout<<s<<endl; }
a.cc: In function 'int main()': a.cc:6:14: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)' 6 | string s(19); | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/inc...
s312738169
p03826
C++
#include<bits/stdc++.h> using namespace std; int main(void){ string s; s.at(5)=' '; s.at(13)=' '; cout>>s>>endl; }
a.cc: In function 'int main()': a.cc:11:7: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 11 | cout>>s>>endl; | ~~~~^~~ | | | | | std::string {aka std::__cxx11::basic_str...
s811549542
p03826
C++
#include <iostream> #include <vector> #include <string> #include <cstdlib> #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <math.h> #include <string.h> #include <map> #define Z class #define ln cout<<'\n' #define ll long long #define rep(i, n) for(int i = 0; i < (n); ++i) //ASCII a=9...
a.cc: In function 'int main()': a.cc:38:12: error: 'A' was not declared in this scope 38 | pr(max(A*B,C*D)); | ^ a.cc:38:14: error: 'B' was not declared in this scope 38 | pr(max(A*B,C*D)); | ^ a.cc:38:16: error: 'C' was not declared in this scope 38 | pr(max(A*B...
s364573379
p03826
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,d; cin<<a<<b<<c<<d; if(a*b>=c*d) cout<<a*b<<endl; else cout<<c*d<<endl; }
a.cc: In function 'int main()': a.cc:5:19: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 5 | int a,b,c,d; cin<<a<<b<<c<<d; | ~~~^~~ | | | | | int | std::istrea...
s794485566
p03826
C
#include <stdio.h> int main(int argc, char **argv) { int a,b,c,d; scanf("%d %d %d %d\n", &a, &b, &c, &d); printf("%d", ((a*b)<(c*d)? c*d : a*b); }
main.c: In function 'main': main.c:5:40: error: expected ')' before ';' token 5 | printf("%d", ((a*b)<(c*d)? c*d : a*b); | ~ ^ | ) main.c:5:41: error: expected ';' before '}' token 5 | printf("%d", ((a*b)<(c*d)? c*d : a*...
s772829748
p03826
C
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c,d; cin >> a >> b >> c >> d; cout << max(a*b,c*d) << endl; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s264775484
p03826
C++
#include <iostream> using namespace std; int main() { int a,b,c,d; int ab,cd; cin >> a >> b >> c >> d; ab=a*b; cd=c*d; if(ab=>cd){ cout << ab; } else{ cout << cd; } return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: expected primary-expression before '>' token 10 | if(ab=>cd){ | ^
s801565664
p03826
C++
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); sc.close(); int ab = a * b; ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s188984026
p03826
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C,D; cin >> A >> B; cin >> C >> D; int K; int H; K = A*B H = C*D if (K >= H) { cout<<K<<endl; } else { cout<<H<<endl; } }
a.cc: In function 'int main()': a.cc:10:10: error: expected ';' before 'H' 10 | K = A*B | ^ | ; 11 | H = C*D | ~ a.cc:15:3: error: 'else' without a previous 'if' 15 | else { | ^~~~
s469064810
p03826
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C,D; cin >> A >> B; cin >> C >> D; K = A*B H = C*D if (K >= H) { cout<<K<<endl; } else{ cout<<H<<endl; } }
a.cc: In function 'int main()': a.cc:8:3: error: 'K' was not declared in this scope 8 | K = A*B | ^ a.cc:13:3: error: 'else' without a previous 'if' 13 | else{ | ^~~~ a.cc:14:11: error: 'H' was not declared in this scope 14 | cout<<H<<endl; | ^
s891740376
p03826
C++
#include <bits/stdc++.h> using namespace std; int main() { cin >> A >> B; cin >> C >> D; K = A*B H = C*D if (K >= H) { cout<<K<<endl; } else{ cout<<H<<endl; } }
a.cc: In function 'int main()': a.cc:5:10: error: 'A' was not declared in this scope 5 | cin >> A >> B; | ^ a.cc:5:15: error: 'B' was not declared in this scope 5 | cin >> A >> B; | ^ a.cc:6:10: error: 'C' was not declared in this scope 6 | cin >> C >> D; | ...
s158567600
p03826
C++
using namespace std; int main(){ int A,B,C,D,rectangle1,rectangle2; //Vertical side length of rectangle1 cin >> A; // Horizontal side length of rectangle1 cin >> B; //Vertical side length of rectangle2 cin >> C; // Horizontal side length of rectangle2 cin >> D; rectangle1 = A*B; rectangle2 = C*D; if( rec...
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope 6 | cin >> A; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:16:17: error: 'cout' was no...
s516444872
p03826
C++
#include<cstdio> using namespace std; int array[200005]={0}; int main(){ int a,b,c,d; cin>>a>>b>>c>>d; cout<<max(a*b,c*d)<<endl; }
a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin>>a>>b>>c>>d; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ |+#include <iostream> 2 | using namespa...
s684090488
p03826
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,area1,area2; cin>>a>>b>>c>>d; areai=a*b; area2=c*d; if(area1>area2){ cout<<area1; }else{ cout<<area2; } return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'areai' was not declared in this scope; did you mean 'area2'? 7 | areai=a*b; | ^~~~~ | area2
s252996473
p03826
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B >> C >> D; if (A*B>=C*D){ cout << A*B << endl; } else{ cout << C*D << endl; } }
a.cc: In function 'int main()': a.cc:6:20: error: 'C' was not declared in this scope 6 | cin >> A >> B >> C >> D; | ^ a.cc:6:25: error: 'D' was not declared in this scope 6 | cin >> A >> B >> C >> D; | ^
s349710411
p03826
C++
#include <iostream> using namespace std; int main() { longlong a,b,c,d,e,f; cin >> a; cin >> b; cin >> c; cin >> d; e = a*b; f = c*d; if (e>f) { cout << f << "\n"; } else if (e=f) { cout << e << "\n"; } else { cout << e << "\n"; } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'longlong' was not declared in this scope 6 | longlong a,b,c,d,e,f; | ^~~~~~~~ a.cc:7:16: error: 'a' was not declared in this scope 7 | cin >> a; | ^ a.cc:8:16: error: 'b' was not declared in this scope 8 | ...
s958393710
p03826
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int a,b,c,d; cin >> a >> b >> c >> d; if(a * b < c * d) cout << c * d << endl; else coud << a * b << endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:9:14: error: 'coud' was not declared in this scope 9 | else coud << a * b << endl; | ^~~~
s501487389
p03826
C++
#include <bits/stdc++.h> using namespace std; int main(){ cin >> a >> b >> c >> d; cout << max(a*b, c*d); return 0; }
a.cc: In function 'int main()': a.cc:5:12: error: 'a' was not declared in this scope 5 | cin >> a >> b >> c >> d; | ^ a.cc:5:17: error: 'b' was not declared in this scope 5 | cin >> a >> b >> c >> d; | ^ a.cc:5:22: error: 'c' was not declared in this scope 5 | ...
s324109745
p03826
C++
#include <bits/stdc++.h> using namespace std; int main () { int A, B, C, D; cin >> A >> B >> C >> D; int s = A*B, t = C*D; cin >> s >> t; int ans = max(a,b); cout << ans << endl; if ( a == b ) { cout << a << endl; } }
a.cc: In function 'int main()': a.cc:11:19: error: 'a' was not declared in this scope 11 | int ans = max(a,b); | ^ a.cc:11:21: error: 'b' was not declared in this scope 11 | int ans = max(a,b); | ^
s847690745
p03826
C++
#include <bits/stdc++.h> using namespace std; int main () { int A, B, C, D; cin >> A >> B >> C >> D; int s = A*B, t = C*D; cin >> s >> t; int ans = max(a,b); cout << ans << endl; if ( a == b ) { cout << a << endl; }
a.cc: In function 'int main()': a.cc:11:19: error: 'a' was not declared in this scope 11 | int ans = max(a,b); | ^ a.cc:11:21: error: 'b' was not declared in this scope 11 | int ans = max(a,b); | ^ a.cc:16:6: error: expected '}' at end of input 16 | ...
s142527950
p03826
Java
import java.util.*; public class Main{ public static void main(String[]args){ Scanner sc=new Scanner(System.in); int a=sc.nextInt();int b=sc.nextInt();int c=sc.nextInt();int d=sc.nextInt(); System.out.println(math.max(a*b,c*d)); } }
Main.java:6: error: cannot find symbol System.out.println(math.max(a*b,c*d)); ^ symbol: variable math location: class Main 1 error
s577398377
p03826
C++
#include <cstdlib> #include <iostream> using namescape std; int main(){ int a,b,c,d; scanf("%d %d %d %d",&a,&b,&c,&d); if(a*b > c*d) cout << a*b; else cout << c*d; }
a.cc:3:7: error: expected nested-name-specifier before 'namescape' 3 | using namescape std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | if(a*b > c*d) cout << a*b; | ^~~~ | ...
s467990965
p03826
C++
#include <cstdlib> #include <iostream> int main(){ int a,b,c,d; scanf("%d %d %d %d",&a,&b,&c,&d); if(a*b > c*d) cout << a*b; else cout << c*d; }
a.cc: In function 'int main()': a.cc:6:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | if(a*b > c*d) cout << a*b; | ^~~~ | std::cout In file included from a.cc:2: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 |...