submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s607416577
p03997
C++
include<bits/stdc++.h> #define rep(i,n) for (int i = 0; i < n; ++i) #define rep2(i,s,n) for (int i = s; i < n; ++i) #define all(a) a.begin(),a.end() using namespace std; int main() { int a,b,h; cin >> s >> b >> h; cout << (a+b)*h/2 << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:9:5: error: 'cin' was not declared in this scope 9 | cin >> s >> b >> h; | ^~~ a.cc:9:12: error: 's' was not declared in this scope 9 | cin >> s >> b >> h; | ^ a.cc:10:5: error: 'cout' was not declared in this scope 10 | cout << (a+b)*h/2 << endl; | ^~~~ a.cc:10:26: error: 'endl' was not declared in this scope 10 | cout << (a+b)*h/2 << endl; | ^~~~
s242287744
p03997
C++
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <cmath> #include <map> #include <tuple> using namespace std; int main() { int a, b, h cin >> a >> b >> h; cout << (a+b)*h/2 << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:5: error: expected initializer before 'cin' 14 | cin >> a >> b >> h; | ^~~ a.cc:16:19: error: 'h' was not declared in this scope 16 | cout << (a+b)*h/2 << endl; | ^
s034590833
p03997
C
#include<stdio.h> int main(void){ int a,b,h,ans=0; scanf("%d %d %d",&a,&b,&h); ans=(a+n)*h; printf("%d",ans/2); return 0; }
main.c: In function 'main': main.c:5:12: error: 'n' undeclared (first use in this function) 5 | ans=(a+n)*h; | ^ main.c:5:12: note: each undeclared identifier is reported only once for each function it appears in
s445424256
p03997
C++
#include<bits/stdc++.h> using namespace std; int main(){ long a,b,c; cin>>a>>b>>c; cout<<(a+b)*n/2<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:6:17: error: 'n' was not declared in this scope 6 | cout<<(a+b)*n/2<<'\n'; | ^
s181396772
p03997
Java
import java.util.*; public class ABC045A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(), b = sc.nextInt(), h = sc.nextInt(); System.out.println((a+b)*h/2); sc.close(); } }
Main.java:3: error: class ABC045A is public, should be declared in a file named ABC045A.java public class ABC045A { ^ 1 error
s692902415
p03997
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a, b, h; System.out.println((a+b)*h/2); sc.close(); } }
Main.java:9: error: variable a might not have been initialized System.out.println((a+b)*h/2); ^ Main.java:9: error: variable b might not have been initialized System.out.println((a+b)*h/2); ^ Main.java:9: error: variable h might not have been initialized System.out.println((a+b)*h/2); ^ 3 errors
s571576076
p03997
C++
#include<bits/stdc++.h> using namespace std; long long a,b,c; int main() { cin>>a>>b>>h; cout<<(a+b)*c/2; return 0; }
a.cc: In function 'int main()': a.cc:6:16: error: 'h' was not declared in this scope 6 | cin>>a>>b>>h; | ^
s671978321
p03997
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; const int inf = 1001001001; int main(){ int a, b, h; cin >> a >> b >> h; cout << (a+b)*h/2 << endl: }
a.cc: In function 'int main()': a.cc:11:28: error: expected ';' before ':' token 11 | cout << (a+b)*h/2 << endl: | ^ | ;
s730235321
p03997
C++
#include <bits/ctdc++.h> using namespace std; int main(){ int a,b,h; cin >> a >> b >> h; cout << (a+b)/2*h << endl; }
a.cc:1:10: fatal error: bits/ctdc++.h: No such file or directory 1 | #include <bits/ctdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s718011049
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>n>>a>>b; cout<<(a+b)*h/2<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:10: error: 'n' was not declared in this scope 6 | cin>>n>>a>>b; | ^
s647940754
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>n>>a>>b; cout<<(a+b)*h/2<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:10: error: 'n' was not declared in this scope 6 | cin>>n>>a>>b; | ^
s979124469
p03997
C++
#include <bits/stdc++.h> #define rep(i,n) for(int64_t i=0;i < (int64_t)(n);i++) using namespace std; //////全探索したいときに開けよ//////// vector<vector<int>> fspattern; vector<int> fspattern_draft; int fspcnt = 0; void setfspattern_core(int floor,int number,int degree){ if(floor==degree){ fspattern.at(fspcnt) = fspattern_draft; fspcnt++; }else{ rep(i,number){ fspattern_draft.at(floor) = i; setfspattern_core(floor+1,number,degree); } } } void setfspattern(int number,int degree){ int64_t array_num = 1; rep(i,degree){ array_num *= number; } fspattern = vector<vector<int>>(array_num,vector<int>(degree)); fspattern_draft = vector<int>(degree); setfspattern_core(0,number,degree); } //////nCrのmodを求めたいときに開けよ///////// //int64_t univMod = 1000000007; //int64_t factnum = 100000 //vector<int64_t> modfact(factnum); //vector<int64_t> modinvfact(factnum); /*void setmodfact(){ for(int i=0;i<factnum;i++){ if(i == 0){ modfact.at(i) = 1; }else{ modfact.at(i) = (modfact.at(i-1)*i)%univMod; } } } int64_t calcmodpower(int64_t a,int64_t n){ int64_t res = 1; while(n != 0){ if(n & 1){ res = (res * a) % univMod; } a = (a*a) % univMod; n = n >> 1; } return res; } int64_t calcinverse(int64_t n){ return calcmodpower(n,univMod-2); } void setmodinvfact(){ for(int i=0;i<factnum;i++){ if(i==0){ modinvfact.at(i) = 1; }else{ modinvfact.at(i) = calcmodpower(modfact.at(i),univMod-2); } } } int64_t calcmodcomb(int64_t n,int64_t r){ return (((modfact.at(n)*modinvfact.at(r))%univMod)*modinvfact.at(n-r))%univMod; } int64_t calcmodpositive(int64_t n){ return (n + ((abs(n)+univMod-1)/univMod)*univMod)%univMod; } */ int64_t calcGCD(int64_t a,int64_t b){ int64_t p = a; int64_t q = b; int64_t c = a%b; while(c != 0){ p = q; q = c; c = p%q; } return q; } int main(){ int a,b,h; cin >> a >> b >> h; cout <<((a+b)*h)/2 endl; }
a.cc: In function 'int main()': a.cc:102:21: error: expected ';' before 'endl' 102 | cout <<((a+b)*h)/2 endl; | ^~~~~ | ;
s715961813
p03997
C++
#include <bits/stdc++.h> using namespace std; int main (){ int a,b,c; cin>>a>>b>>c; int sum == a+b; cout<<sum*c/2<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: expected initializer before '==' token 7 | int sum == a+b; | ^~ a.cc:8:9: error: 'sum' was not declared in this scope 8 | cout<<sum*c/2<<endl; | ^~~
s609453397
p03997
C++
/*package whatever //do not write package name here */ import java.io.*; import java.util.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; import java.util.StringTokenizer; public class Main { static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } public static void main (String[] args) { FastReader ob = new FastReader(); int a = ob.nextInt(),b=ob.nextInt(),h=ob.nextInt(); int ans = (h*a)+ (h*(b-a))/2; System.out.println(ans); } }
a.cc:3:1: error: 'import' does not name a type 3 | import java.io.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.util.*; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import java.io.BufferedReader; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: 'import' does not name a type 6 | import java.io.IOException; | ^~~~~~ a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:7:1: error: 'import' does not name a type 7 | import java.io.InputStreamReader; | ^~~~~~ a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: 'import' does not name a type 8 | import java.util.Scanner; | ^~~~~~ a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:9:1: error: 'import' does not name a type 9 | import java.util.StringTokenizer; | ^~~~~~ a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:11:1: error: expected unqualified-id before 'public' 11 | public class Main | ^~~~~~
s359170549
p03997
C++
#include<bits/stdc++.h> using namespace std; int a,b,h; int ans; int amin(){ cin>>a>>b>>h; ans=(a+b)*h*1.0/2; cout<<ans<<endl; return 0; }
/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
s075026633
p03997
C++
#include<bits/stdc++.h> using namespace std; int a,b,h; int ans; int amin(){ cin>>a>>b>>h; ans=(a+b)*c*1.0/2; cout<<ans<<endl; return 0; }
a.cc: In function 'int amin()': a.cc:7:19: error: 'c' was not declared in this scope 7 | ans=(a+b)*c*1.0/2; | ^
s215003229
p03997
C++
#include<bits/stdc++.h> int main(){ int a,b,h; scanf("%d %d %d",&a,&b,&c); printf("%d",(a+b)*h/2); return 0; }
a.cc: In function 'int main()': a.cc:4:29: error: 'c' was not declared in this scope 4 | scanf("%d %d %d",&a,&b,&c); | ^
s404306277
p03997
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d; cin >>a>>b>>c; cout << (a+b)*c/2 }
a.cc: In function 'int main()': a.cc:6:20: error: expected ';' before '}' token 6 | cout << (a+b)*c/2 | ^ | ; 7 | } | ~
s665332425
p03997
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,h; cin >. a >> b >> h; cout << ((a+b)*h)/2; }
a.cc: In function 'int main()': a.cc:6:10: error: expected primary-expression before '.' token 6 | cin >. a >> b >> h; | ^
s510339184
p03997
C++
#include <iostream> using namespace std; int mian(){ int a; int b; int h; cin >> a; cin >> b; cin >> h; cout << (a + b) * h / 2 << endl; }
a.cc: In function 'int mian()': a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type] 13 | } | ^ /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
s736125521
p03997
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <stack> #include <cctype> #include <climits> #include <string> #include <bitset> #include <cfloat> #include <unordered_set> #pragma GCC optimize("Ofast") using namespace std; typedef long double ld; typedef long long int ll; typedef unsigned long long int ull; typedef vector<int> vi; typedef vector<char> vc; typedef vector<bool> vb; typedef vector<double> vd; typedef vector<string> vs; typedef vector<ll> vll; typedef vector<pair<int,int> > vpii; typedef vector<vector<int> > vvi; typedef vector<vector<char> > vvc; typedef vector<vector<string> > vvs; typedef vector<vector<ll> > vvll; #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n) - 1; i >= 0; --i) #define fin(ans) cout << (ans) << '\n' #define STI(s) atoi(s.c_str()) #define mp(p,q) make_pair(p, q) #define pb(n) push_back(n) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define Sort(a) sort(a.begin(), a.end()) #define Rort(a) sort(a.rbegin(), a.rend()) #define MATHPI acos(-1) #define itn int template <class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;} return 0;} template <class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;} return 0;} struct io{io(){ios::sync_with_stdio(false);cin.tie(0);}}; const ll MOD = 1000000007; const double EPS = 1e-9; const int INF = INT_MAX; const ll LLINF = 1LL<<60; int main(void) { int a,b,h; cin>>a>>b>>h; fin((a+b)*h/2) }
a.cc: In function 'int main()': a.cc:61:1: error: expected ';' before '}' token 61 | } | ^
s297315335
p03997
C++
a,b,c=map(int,input().split()) print((a+b)*h/2)
a.cc:1:1: error: 'a' does not name a type 1 | a,b,c=map(int,input().split()) | ^
s110678467
p03997
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 h = sc.nextInt(); System.out.println((a+b)*h/2); } }
Main.java:6: error: cannot find symbol int b = sc.nextint(); ^ symbol: method nextint() location: variable sc of type Scanner 1 error
s006320853
p03997
C++
#include <bits/stdc++.h> #include <string> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <numeric> using namespace std; int abs(int num){ if (num > 0) return num; else return -num; } long long gcd(long long a, long long b) { if (b==0) return a; else return gcd(b, a%b); } long long lcm(long long a, long long b) { return a * b / gcd(a, b); } int main(){ int a,h,b; cin >> a >> h >> b; cout << (a+b)*h / 2 << endl; }
a.cc:28:21: error: extended character   is not valid in an identifier 28 | cout << (a+b)*h / 2 << endl; | ^ a.cc: In function 'int main()': a.cc:28:21: error: unable to find numeric literal operator 'operator""\U00003000' 28 | cout << (a+b)*h / 2 << endl; | ^~~
s217114706
p03997
C++
#include <bits/stdc++.h> #include <string> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <numeric> using namespace std; int abs(int num){ if (num > 0) return num; else return -num; } long long gcd(long long a, long long b) { if (b==0) return a; else return gcd(b, a%b); } long long lcm(long long a, long long b) { return a * b / gcd(a, b); } int main(){ int a,h,b; cin >> a >> h >> b; cout << (a+b)*h / 2 }
a.cc: In function 'int main()': a.cc:28:22: error: expected ';' before '}' token 28 | cout << (a+b)*h / 2 | ^ | ; 29 | } | ~
s308811025
p03997
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int a,b,h; cin>>a>>b>>h; cout<<(a+b)*h/2<<endl }
a.cc: In function 'int main()': a.cc:7:26: error: expected ';' before '}' token 7 | cout<<(a+b)*h/2<<endl | ^ | ; 8 | 9 | } | ~
s829694283
p03997
Java
import java,.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a,b,h ; a = sc.nextInt(); b = sc.nextInt(); h = sc.nextInt(); System.out.println((a*b*h)/2); } }
Main.java:1: error: '.' expected import java,.util.*; ^ 1 error
s956377487
p03997
Java
import java,.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a,b,h ; a = sc.nextInt(); b = sc.nextInt(); h = sc.nextInt(); System.oput.println((a*b*h)/2); } }
Main.java:1: error: '.' expected import java,.util.*; ^ 1 error
s300694465
p03997
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c;cin>>a>>b>>c; cout<<0.5*(a+b)*h<<endl; }
a.cc: In function 'int main()': a.cc:5:25: error: 'h' was not declared in this scope 5 | cout<<0.5*(a+b)*h<<endl; | ^
s076513181
p03997
C
main :: IO () main = do a <- readLn b <- readLn h <- readLn print $ (a+b)*h `div` 2
main.c:3:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '::' token 3 | main :: IO () | ^~ main.c:8:21: error: stray '`' in program 8 | print $ (a+b)*h `div` 2 | ^ main.c:8:25: error: stray '`' in program 8 | print $ (a+b)*h `div` 2 | ^
s007484307
p03997
C++
#include <iostream> using namespace std; int main() { int a,b,h,; cin>>a>>b>>h; cout<<(a+b)*0.5*h; return 0; }
a.cc: In function 'int main()': a.cc:5:13: error: expected unqualified-id before ';' token 5 | int a,b,h,; | ^
s883094833
p03997
C++
#include <iostream> using namespace std; int main() { int a,b,h,; cin>>a>>b>>h; cout<< (a+b)*h*0.5; return 0; }
a.cc: In function 'int main()': a.cc:5:13: error: expected unqualified-id before ';' token 5 | int a,b,h,; | ^
s688048661
p03997
C++
#include <iostream> using namespace std; int main() { int a,b,h,c; cin>>a>>b>>h; c=((a+b)/2)*h cout<<c; }
a.cc: In function 'int main()': a.cc:7:16: error: expected ';' before 'cout' 7 | c=((a+b)/2)*h | ^ | ; 8 | cout<<c; | ~~~~
s847393393
p03997
C++
#inclode <iostream> using namespace std; int main() { int a,b,h,c; cin>>a>>b>>h; c=((a+b)/2)*h cout<<c; }
a.cc:1:2: error: invalid preprocessing directive #inclode; did you mean #include? 1 | #inclode <iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin>>a>>b>>h; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #inclode <iostream> a.cc:7:16: error: expected ';' before 'cout' 7 | c=((a+b)/2)*h | ^ | ; 8 | cout<<c; | ~~~~
s732674922
p03997
C
#include <stdio.h> int main(void){ int up,buttom,high,sum; scanf("%d%d%d",&up,&buttom,&high); sum=((up+buttom)*high/2) return 0; }
main.c: In function 'main': main.c:5:33: error: expected ';' before 'return' 5 | sum=((up+buttom)*high/2) | ^ | ; 6 | return 0; | ~~~~~~
s917199994
p03997
C++
#include<bits/stdc++.h> using namespace std; int a,b,h; int main(){ cin>>a>>b>>h; coutt<<((a+b)*h)/2<<endl;
a.cc: In function 'int main()': a.cc:6:3: error: 'coutt' was not declared in this scope 6 | coutt<<((a+b)*h)/2<<endl; | ^~~~~ a.cc:6:28: error: expected '}' at end of input 6 | coutt<<((a+b)*h)/2<<endl; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s784026518
p03997
C++
#include <bits/stdc++.h> int main() { int a,b,h;cin>>a>>b>>h; int ans = (a+b)*h/2; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:4:13: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | int a,b,h;cin>>a>>b>>h; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout << ans << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:6:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout << ans << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s639096745
p03997
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 H = sc.nextInt(); System.out.println((A+B)*h/2); } }
Main.java:9: error: cannot find symbol System.out.println((A+B)*h/2); ^ symbol: variable h location: class Main 1 error
s136081153
p03997
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,h,s; cin >> a >> b >> h; s = (a+b)*h/2 cout << s << endl; }
a.cc: In function 'int main()': a.cc:9:16: error: expected ';' before 'cout' 9 | s = (a+b)*h/2 | ^ | ; 10 | 11 | cout << s << endl; | ~~~~
s376055578
p03997
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include<numeric> #include<cstring> #include<cstdio> #include<functional> #include<bitset> #include<limits.h> #include<cassert> #include<iterator> #include<complex> #include<stack> #include<sstream> using namespace std; typedef long long int lint; typedef pair<int, int> P; typedef pair<lint, lint> LLP; typedef pair<char, char>CP; #define rep(i, n) for (int i = 0; i < n; i++) #define repr(i, n) for (int i = n; i >= 0; i--) #define sort(v) sort((v).begin(), (v).end()) #define reverse(v) reverse((v).begin(), (v).end()) #define upper(v,hoge) upper_bound(v.begin(),v.end(),hoge) #define lower(v,hoge) lower_bound(v.begin(),v.end(),hoge) #define llower(v,hoge) *lower_bound(v.begin(), v.end(), hoge) #define lupper(v,hoge) *upper_bound(v.begin(), v.end(), hoge) /* vector<char>al(26); al = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; vector<char>AL(26); AL = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; vector<char>NUM(10); NUM = { '0','1','2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'8' ,'9' }; */ int main() { int a, b, h; cin >> a >> b >> h; cout << (A + B) * h / 2 << endl; }
a.cc: In function 'int main()': a.cc:48:18: error: 'A' was not declared in this scope 48 | cout << (A + B) * h / 2 << endl; | ^ a.cc:48:22: error: 'B' was not declared in this scope 48 | cout << (A + B) * h / 2 << endl; | ^
s272991775
p03997
C++
#include<iostream> using namesapce std; int main() { int a,b,h; cin>>a>>b>>h; cout<<(a+b)*h/2<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>h; | ^~~ | 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 input | ^~~ a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<(a+b)*h/2<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | cout<<(a+b)*h/2<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s471658331
p03997
C
#include <stdio.h> int main(void){ int a; int b; int c; int d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d=(a+b)*h/2; printf("%d\n",d); return 0; }
main.c: In function 'main': main.c:11:11: error: 'h' undeclared (first use in this function) 11 | d=(a+b)*h/2; | ^ main.c:11:11: note: each undeclared identifier is reported only once for each function it appears in
s401114671
p03997
C
#include <stdio.h> int main(void){ int a; int b; int c; int d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d=(a+b)*h/2; printf("%d\n",d); return 0; }
main.c: In function 'main': main.c:11:11: error: 'h' undeclared (first use in this function) 11 | d=(a+b)*h/2; | ^ main.c:11:11: note: each undeclared identifier is reported only once for each function it appears in
s916695148
p03997
C
#include <stdio.h> int main(void){ int a; int b; int c; int d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d=(a+b)*h/2; printf("%d\n",d); return 0; }
main.c: In function 'main': main.c:11:11: error: 'h' undeclared (first use in this function) 11 | d=(a+b)*h/2; | ^ main.c:11:11: note: each undeclared identifier is reported only once for each function it appears in
s416757184
p03997
C++
#include <cstdio> int main() { int a, b, h; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &h); printf("%d", (a + b) * h / 2); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s128709412
p03997
C
#include <stdio.h> int main(void){ int a; int b; int c; int d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d=(a+b)*h/2; printf("%d",d); return 0; }
main.c: In function 'main': main.c:11:11: error: 'h' undeclared (first use in this function) 11 | d=(a+b)*h/2; | ^ main.c:11:11: note: each undeclared identifier is reported only once for each function it appears in
s209322481
p03997
C++
#include <cstdio> int main(){ int a,b,h; scanf_s("%d",&a); scanf_s("%d",&b); scanf_s("%d",&h); printf("%d",a*b*h/2); }
a.cc: In function 'int main()': a.cc:5:3: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d",&a); | ^~~~~~~ | scanf
s865517101
p03997
C
#include <stdio.h> int main(void){ int a,b,c,d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d=(a+b)*h/2; printf("%d",d); return 0; }
main.c: In function 'main': main.c:9:11: error: 'h' undeclared (first use in this function) 9 | d=(a+b)*h/2; | ^ main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in
s406761865
p03997
C
#include <stdio.h> int main(void){ int a,b,c,d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d=(a+b)*h/2; printf("%d",d); return 0; }
main.c: In function 'main': main.c:9:11: error: 'h' undeclared (first use in this function) 9 | d=(a+b)*h/2; | ^ main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in
s203906143
p03997
C
#include <stdio.h> int main(void){ int a,b,c,d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d=(a+b)*h/2; printf("%d",d);
main.c: In function 'main': main.c:9:11: error: 'h' undeclared (first use in this function) 9 | d=(a+b)*h/2; | ^ main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in main.c:11:3: error: expected declaration or statement at end of input 11 | printf("%d",d); | ^~~~~~
s900619974
p03997
C
#include <stdio.h> int main(){ int a,b,c,d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d=(a+b)*h/2; printf("%d",d);
main.c: In function 'main': main.c:9:11: error: 'h' undeclared (first use in this function) 9 | d=(a+b)*h/2; | ^ main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in main.c:11:3: error: expected declaration or statement at end of input 11 | printf("%d",d); | ^~~~~~
s521882470
p03997
C++
#include <cstdio> int main(){ int a,b,h; scanf("%d",a); scanf("%d",b); scanf("%d",h); printf("%d",a*b*h/2) }
a.cc: In function 'int main()': a.cc:9:23: error: expected ';' before '}' token 9 | printf("%d",a*b*h/2) | ^ | ; 10 | } | ~
s739941864
p03997
C++
#include <cstdio> int main(){ int a,b,h; scanf("%d", &a) scanf("%d", &b) scanf("%d", &h) printf("%d", (a + b) *h /2)
a.cc: In function 'int main()': a.cc:5:18: error: expected ';' before 'scanf' 5 | scanf("%d", &a) | ^ | ; 6 | scanf("%d", &b) | ~~~~~ a.cc:9:32: error: expected '}' at end of input 9 | printf("%d", (a + b) *h /2) | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s336617341
p03997
C++
int main(void){ int a; int b; int h; scanf("%d",&a); scanf("%d",&b); scanf("%d",&h); int A; A = (a+b)*h/2 print(A); }
a.cc: In function 'int main()': a.cc:5:3: error: 'scanf' was not declared in this scope 5 | scanf("%d",&a); | ^~~~~ a.cc:9:16: error: expected ';' before 'print' 9 | A = (a+b)*h/2 | ^ | ; 10 | print(A); | ~~~~~
s861447401
p03997
C
#include<cstdio> int main(){ int a,b,h; scanf("%d",&a); scanf("%d",&b); scanf("%d",&h); printf("%d",(a+b)*h/2); }
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s400513752
p03997
C++
#include<iostream> using namespace; int main(void) { int a,b,h; cin>>a,b,h; cout<<(a+b)*h/2<<endl; }
a.cc:3:16: error: expected identifier before ';' token 3 | using namespace; | ^ a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin>>a,b,h; | ^~~ | 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 input | ^~~ a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout<<(a+b)*h/2<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout<<(a+b)*h/2<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s923149482
p03997
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pint = pair<int, int>; using edge = pair<int, ll>; using graph = vector<vector<Edge>>; const ll INF = 1LL << 60; const int INF32 = 1 << 29; const ll MOD = 1000000007; int main() { int n,m, T; cin >> n>> m>> T; int ans = (n+m)* T/2; cout << ans << endl; }
a.cc:7:29: error: 'Edge' was not declared in this scope; did you mean 'edge'? 7 | using graph = vector<vector<Edge>>; | ^~~~ | edge a.cc:7:29: error: template argument 1 is invalid a.cc:7:29: error: template argument 2 is invalid a.cc:7:33: error: template argument 1 is invalid 7 | using graph = vector<vector<Edge>>; | ^~ a.cc:7:33: error: template argument 2 is invalid
s759914211
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << ((a + b) * h) / 2 << endl; }
a.cc: In function 'int main()': a.cc:8:22: error: 'h' was not declared in this scope 8 | cout << ((a + b) * h) / 2 << endl; | ^
s530682799
p03997
C++
#include<iostream> usinge namespace std; int main(){ int a,b,h; cin>>a>>b>>h; cout<<(a+b)*h/2; return 0; }
a.cc:2:1: error: 'usinge' does not name a type; did you mean 'unsigned'? 2 | usinge namespace std; | ^~~~~~ | unsigned a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b>>h; | ^~~ | 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 input | ^~~ a.cc:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<(a+b)*h/2; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s810983409
p03997
C++
#include<bits/stdc++.h> using namespace std; int main{ cin>>a>>b>>h; cout<<(a+b)*h*.5<<endl; return 0; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main{ | ^~~~ a.cc:4:7: error: 'a' was not declared in this scope 4 | cin>>a>>b>>h; | ^ a.cc:4:10: error: 'b' was not declared in this scope 4 | cin>>a>>b>>h; | ^ a.cc:4:13: error: 'h' was not declared in this scope 4 | cin>>a>>b>>h; | ^ a.cc:4:14: error: expected '}' before ';' token 4 | cin>>a>>b>>h; | ^ a.cc:3:9: note: to match this '{' 3 | int main{ | ^ a.cc:5:2: error: 'cout' does not name a type 5 | cout<<(a+b)*h*.5<<endl; | ^~~~ a.cc:6:2: error: expected unqualified-id before 'return' 6 | return 0; | ^~~~~~ a.cc:7:1: error: expected declaration before '}' token 7 | } | ^
s715037271
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,c,d; cin>>a>>b>>c; cout<<(a+b)*(c/2); retturn 0; }
a.cc: In function 'int main()': a.cc:11:3: error: 'retturn' was not declared in this scope 11 | retturn 0; | ^~~~~~~
s158014607
p03997
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,h; cin >> a; cin >> b; cin >> h; cout << (a+b)/2*h;
a.cc: In function 'int main()': a.cc:8:21: error: expected '}' at end of input 8 | cout << (a+b)/2*h; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s720310753
p03997
C++
#include <iosream> int main(){int a,b,h;std::cin>>a>>b>>h;std::cout<<(a+b)*h/2;}
a.cc:1:10: fatal error: iosream: No such file or directory 1 | #include <iosream> | ^~~~~~~~~ compilation terminated.
s680028020
p03997
C++
#include<stdc++.h> using namespace std; int main(){ int a,b,h,s; cin >> a; cin >> b; cin >> h; s = (a + b) * h / 2; cout << s << endl; }
a.cc:1:9: fatal error: stdc++.h: No such file or directory 1 | #include<stdc++.h> | ^~~~~~~~~~ compilation terminated.
s268901416
p03997
C++
#include<bits/stdc++.h> using namespace std; int main() { int a, b, h, m; cin >> a >> b >> h; m = (a+b)*h/2 cout << m << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: expected ';' before 'cout' 7 | m = (a+b)*h/2 | ^ | ; 8 | 9 | cout << m << endl; | ~~~~
s060774674
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> h; cout << (a + b)*h/2 << endl; }
a.cc: In function 'int main()': a.cc:6:20: error: 'h' was not declared in this scope 6 | cin >> a >> b >> h; | ^
s944412845
p03997
C++
double a,b,h,x; int x=(a+b)*h/2;
a.cc:2:5: error: conflicting declaration 'int x' 2 | int x=(a+b)*h/2; | ^ a.cc:1:14: note: previous declaration as 'double x' 1 | double a,b,h,x; | ^
s271158567
p03997
C++
double a,b,h; int x=(a+b)*h/2;
/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
s088079710
p03997
C++
int a,b,h; int x=(a+b)*h/2;
/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
s712525109
p03997
C++
int a,b,h,x; int x=(a+b)*h/2;
a.cc:2:5: error: redefinition of 'int x' 2 | int x=(a+b)*h/2; | ^ a.cc:1:11: note: 'int x' previously declared here 1 | int a,b,h,x; | ^
s067622027
p03997
C++
int a,b,h,x; int x=(a+b)✳︎h/2;
a.cc:2:12: error: extended character ✳ is not valid in an identifier 2 | int x=(a+b)✳︎h/2; | ^ a.cc:2:5: error: redefinition of 'int x' 2 | int x=(a+b)✳︎h/2; | ^ a.cc:1:11: note: 'int x' previously declared here 1 | int a,b,h,x; | ^
s495536041
p03997
C++
#include<iostream> using namespace std; int main(){ int a,b,h; cin >> a ; cin >> b ; cin >> h ; get char(); cout <<(a+b)*h/2; get char(); return 0; }
a.cc: In function 'int main()': a.cc:8:6: error: expected ';' before 'char' 8 | get char(); | ^~~~~ | ; a.cc:8:13: error: statement cannot resolve address of overloaded function 8 | get char(); | ^ a.cc:10:6: error: expected ';' before 'char' 10 | get char(); | ^~~~~ | ; a.cc:10:13: error: statement cannot resolve address of overloaded function 10 | get char(); | ^
s435199494
p03997
C++
#include<isotream> using namepace std; int a,b,h; cin>>a; cin>>b; cin>>h; get char(); cout<<(a+b)*h/2; get char(); return 0;
a.cc:1:9: fatal error: isotream: No such file or directory 1 | #include<isotream> | ^~~~~~~~~~ compilation terminated.
s206935840
p03997
C
#include <stdio.h> int main() { int a, b, h; scanf("%d%d%d",&a, &b &h); printf("%f\n", (float)(a+b)*h/2); return 0; }
main.c: In function 'main': main.c:6:25: error: invalid operands to binary & (have 'int *' and 'int') 6 | scanf("%d%d%d",&a, &b &h); | ~~ ^ | | | int *
s118779499
p03997
C++
#include<bits/stdc++.h> int main(){ int a,b,h; cin >> a >> b >> h; cout << (a+b)*h/2 << endl; }
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 >> h; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 5 | cout << (a+b)*h/2 << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:5:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 5 | cout << (a+b)*h/2 << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s942619952
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; cout << ((a+b)*c)/2; << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:24: error: expected primary-expression before '<<' token 7 | cout << ((a+b)*c)/2; << endl; | ^~
s574994596
p03997
Java
import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt; int b = sc.nextInt; int h = sc.nextInt; int total = (a + b) * h / 2; System.out.println(total); } }
Main.java:7: error: cannot find symbol int a = sc.nextInt; ^ symbol: variable nextInt location: variable sc of type Scanner Main.java:8: error: cannot find symbol int b = sc.nextInt; ^ symbol: variable nextInt location: variable sc of type Scanner Main.java:9: error: cannot find symbol int h = sc.nextInt; ^ symbol: variable nextInt location: variable sc of type Scanner 3 errors
s974562962
p03997
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int a b h; cin>>a>>b>>h; cout << (a+b)*h/2 << endl;
a.cc: In function 'int main()': a.cc:5:11: error: expected initializer before 'b' 5 | int a b h; | ^ a.cc:6:10: error: 'a' was not declared in this scope 6 | cin>>a>>b>>h; | ^ a.cc:6:13: error: 'b' was not declared in this scope 6 | cin>>a>>b>>h; | ^ a.cc:6:16: error: 'h' was not declared in this scope 6 | cin>>a>>b>>h; | ^ a.cc:7:31: error: expected '}' at end of input 7 | cout << (a+b)*h/2 << endl; | ^ a.cc:3:15: note: to match this '{' 3 | int main(void){ | ^
s281876054
p03997
C++
#include<isotream> using namespace std; int main() { int a,b,h; scanf("%d%d%d",&a,&b,&h); printf("%d",(a+b)*h/2); return 0; }
a.cc:1:9: fatal error: isotream: No such file or directory 1 | #include<isotream> | ^~~~~~~~~~ compilation terminated.
s200804892
p03997
C++
#include<iostream> #include<fstream> #include<algorithm> using namespace std; int a,b,c; int main() { cin>>a>>b>>C; cout<<(a+b)*c/2<<"\n"; return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: 'C' was not declared in this scope 9 | cin>>a>>b>>C; | ^
s784822231
p03997
C++
#include<iostream> #include<fstream> #include<algorithm> using namespace std; int a,b,c; int main() { cin>>a>>b>>C; cout<<(a+b)*c/2; return 0; }
a.cc: In function 'int main()': a.cc:9:15: error: 'C' was not declared in this scope 9 | cin>>a>>b>>C; | ^
s368501992
p03997
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() typedef long long ll; const int INF = 1000000000; const long INF64 = 1000000000000000ll; const int MOD = 1000000007; int main(){ int a,b,h std::cin >> a>>b>>h; std::cout << (a+b)*h/2<< std::endl; }
a.cc: In function 'int main()': a.cc:11:9: error: expected initializer before 'std' 11 | std::cin >> a>>b>>h; | ^~~ a.cc:12:29: error: 'h' was not declared in this scope 12 | std::cout << (a+b)*h/2<< std::endl; | ^
s056053946
p03997
C
#include<stdio.h> int main(void){ int a=0; int b=0; int h=0; int result=0; scanf("%d",&a); scanf("%d",&b); scanf("%d",&h); result=(a+b)*h*/2; printf("%d",result); }
main.c: In function 'main': main.c:11:18: error: expected expression before '/' token 11 | result=(a+b)*h*/2; | ^
s478560528
p03997
C
#include<stdio.h> int main(void){ int a=0; int b=0; int h=0; int result=0; scanf("%d",&a); scanf("%d",&b); scanf("%d",&h); result=(a+b)*h*/2 printf("%d",result); }
main.c: In function 'main': main.c:11:18: error: expected expression before '/' token 11 | result=(a+b)*h*/2 | ^
s095661172
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, h; cin >> a >> b >>h; cout << (a+b) * h/2 return 0; }
a.cc: In function 'int main()': a.cc:7:22: error: expected ';' before 'return' 7 | cout << (a+b) * h/2 | ^ | ; 8 | return 0; | ~~~~~~
s182600771
p03997
C++
#include <bits/stdc++.h> using namespace std; int main (){ int N, K, X,; cin>>N>>K>>X; cout<<(N+K)*X/2<<endl; }
a.cc: In function 'int main()': a.cc:5:17: error: expected unqualified-id before ';' token 5 | int N, K, X,; | ^
s748910505
p03997
C++
#include <bits/stdc++.h> using namespace std; int main (){ int N, K, X; cin>>N>>K>>X; cout<<(N+K)*X/2<<endl; } }
a.cc:9:1: error: expected declaration before '}' token 9 | } | ^
s357767324
p03997
C++
#include <bits/stdc++.h> using namespace std; int main (){ int N, K, X,; cin>>N>>K>>X; cout<<(N+K)*X/2<<endl; } }
a.cc: In function 'int main()': a.cc:5:17: error: expected unqualified-id before ';' token 5 | int N, K, X,; | ^ a.cc: At global scope: a.cc:9:1: error: expected declaration before '}' token 9 | } | ^
s052472474
p03997
C++
#include <iostream> #include <iomanip> #include <vector> #include <cmath> #include <algorithm> #include <iomanip> #include <cstring> #include <map> #define rep(i, N) for (int i = 0; i < (int)N; i++) using namespace std; typedef long long ll; const ll LLINF = 9223372036854775807; const int MOD = 1000000007; int main() { int a, b, h; cin >> a >> b >> h; int result = (A+B)/h; cout << result << endl; return 0; }
a.cc: In function 'int main()': a.cc:18:17: error: 'A' was not declared in this scope 18 | int result = (A+B)/h; | ^ a.cc:18:19: error: 'B' was not declared in this scope 18 | int result = (A+B)/h; | ^
s075356240
p03997
C++
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 k = sc.nextInt(); System.out.println((a+b)*k/2); sc.close(); } }
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:2:1: error: expected unqualified-id before 'public' 2 | public class Main{ | ^~~~~~
s929866941
p03997
C++
def main(): linie = input() vector = [int(x) for x in linie.split()] x = vector[0] y = vector[1] h = vector[2] print(((x + y) * h) // 2) if __name__ == "__main__": main()
a.cc:3:1: error: 'def' does not name a type 3 | def main(): | ^~~
s322448834
p03997
C
#include<stdio.h> int main(){ int a,b,h; scanf("%d\n%d\n%d",&a,&b,&h); if(h%==0){ printf("%d",(a+b)*h/2); }else{ } return 0; }
main.c: In function 'main': main.c:5:9: error: expected expression before '=' token 5 | if(h%==0){ | ^
s941078329
p03997
C
#include<stdio.h> int main(){ int a,b,h,c; scanf("%d\n%d\n%d",&a,&b,&h); c=2*h printf("%d",(a+b)*c/2); return 0; }
main.c: In function 'main': main.c:5:8: error: expected ';' before 'printf' 5 | c=2*h | ^ | ; 6 | printf("%d",(a+b)*c/2); | ~~~~~~
s782778526
p03997
C
#include<stdio.h> int main(){ int a,b,h; scanf("%d\n%d\n%d",&a,&b,&h); printf("%d",(a+b)h); return 0; }
main.c: In function 'main': main.c:5:20: error: expected ')' before 'h' 5 | printf("%d",(a+b)h); | ~ ^ | )
s651991087
p03997
C++
#include<iostream> using namespace std; int main(){ int a,b,h; cin >> a >> b >> h; cout << (a+b)*j*0.5 << endl; }
a.cc: In function 'int main()': a.cc:7:19: error: 'j' was not declared in this scope 7 | cout << (a+b)*j*0.5 << endl; | ^
s090805951
p03997
C++
#include<bits/stdc++.h> using namespace std; int a,b,h int main(){ cin >> a >> b >> h; printf("%d",1/2*(a+b)*h); }
a.cc:4:1: error: expected initializer before 'int' 4 | int main(){ | ^~~
s063185332
p03997
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define SORT(c) sort((c).begin(),(c).end()) #define REVERSE(c) reverse((c).begin(),(c).end()) #define ALL(x) (x).begin(),(x).end() const long long MOD = 1000000007; const long long INF = 1LL << 60; int main(){ int a, b, c; cin >>a >> b >> c; cout << (a + b) * h / 2 << endl; }
a.cc: In function 'int main()': a.cc:13:27: error: 'h' was not declared in this scope 13 | cout << (a + b) * h / 2 << endl; | ^
s013652753
p03997
C++
#include <cstdio> int main(){ int a,b,h; scanf("%d %d %d",&a,&b,&c); long long ans = (a + b) * h / 2; printf("%lld",ans); return 0; }
a.cc: In function 'int main()': a.cc:4:29: error: 'c' was not declared in this scope 4 | scanf("%d %d %d",&a,&b,&c); | ^
s913532516
p03997
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, h; cin >> a >> b >> h; vector<int> vec(n); int s = (a + b)* h / 2; cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:19: error: 'n' was not declared in this scope 8 | vector<int> vec(n); | ^
s217529156
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { string s[3]; cin >>s[0]>>s[1]>>s[2]; int i=0; while(true){ if(s[i].size()==0){ cout<<char('A'+i)<<endl; return0; } char c=s[i][0]; s[i].erase(0,1); i=c-'a'; } }
a.cc: In function 'int main()': a.cc:11:9: error: 'return0' was not declared in this scope 11 | return0; | ^~~~~~~