submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s056991074
p03807
C++
N = int(input()) A = list(map(int, input().split())) for i in A: if i%2 == 0: A.remove(i) ans = len(A) if ans%2 == 0: print("YES") else: print("NO")
a.cc:1:1: error: 'N' does not name a type 1 | N = int(input()) | ^
s376222568
p03807
C++
#include <iostream> using namespace std; int main(){ int N; cin >> N; int j,odd=0,even=0; for(int k = 0; k < N; k++){ cin >> j; if(j % 2 = 0){ even++; } else{ odd++; } } if(odd % 2 == 0){ cout << "YES" << endl; } else { cout << "NO"<< endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:6: error: lvalue required as left operand of assignment 10 | if(j % 2 = 0){ | ~~^~~
s408014152
p03807
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int even = 0; int odd = 0; vector<int> A(N); int temp; for (int i = 0; i < N; ++i) { cin >> temp; if (temp % 2 == 0) { even++; } if (temp % 2 != 0) { odd++; } } while (1) { ...
a.cc: In function 'int main()': a.cc:45:19: error: expected primary-expression before '<' token 45 | if (even =< 1 ) { | ^
s967931098
p03807
C++
#include <bits/stdc++.h> #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i] using namespace std; int main() { int N; cin >> N; int A[1000000050]; HAIRETU(<#N#>, <#A#>); int cnt = 0; for (int i = 0; i < N; i++) { if (A[i] % 2 == 0) { cnt++; } } ...
a.cc:10:14: error: stray '#' in program 10 | HAIRETU(<#N#>, <#A#>); | ^ a.cc:2:36: note: in definition of macro 'HAIRETU' 2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i] | ^ a.cc:10:16: error: stray '#' in program 10 | HAIRETU(<#N#>,...
s152723878
p03807
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,count=0; cin N; vector<int> num(N); for(int i=0; i<N; i++){ cin>>num.at(i); } for(int i=0; i<N; i++){ if(num.at(i) %2 ==1){ count ++; } } if(count%2 ==1){ cout<< "No"<<endl; } else{ cout<<"Yes"<<endl; } }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'N' 6 | cin N; | ^~ | ;
s597902027
p03807
C++
#include <iostream> #include <vector> using namespace std; int main(){ int N; cin >> N; vector A(N); for(int i = 0; i < N; i++) cin >> A[i]; int oddcounter = 0; for(int i = 0; i < N; i++){ if(A[i] % 2 == 1) oddcounter++; } if(oddcounter % 2 == 0) cout << "Yes"; else cout << "No"; }
a.cc: In function 'int main()': a.cc:9:13: error: class template argument deduction failed: 9 | vector A(N); | ^ a.cc:9:13: error: no matching function for call to 'vector(int&)' In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vecto...
s211434314
p03807
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, ans; cin >> N; long long a; for (int i = 0; i<N; i++) {cin >> a; ans+=a%2} if(ans%2==0) cout << "YES" << "\n"; else cout << "NO" << "\n"; }
a.cc: In function 'int main()': a.cc:7:48: error: expected ';' before '}' token 7 | for (int i = 0; i<N; i++) {cin >> a; ans+=a%2} | ^ | ;
s702063090
p03807
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define fw(p) for(int w=0;w<(p);w++) #define fx(p) for(int x=0;x<(p);x++) #define fy(p) for(int y=0;y<(p);y++) #define fz(p) for(int z=0;z<(p);z++) #define fyg(p,g) for(int y=(g);y<(p);y++) #define fzg(p,g) for(int z=(g);z<(p);z++) #define ce(d) cout<...
a.cc: In function 'int main()': a.cc:50:4: error: 'a' was not declared in this scope 50 | if(a%2==0){ | ^
s049388830
p03807
C++
#include <iostream> using namespace std; int main(){ int n; cin >> n; int cnto=0; cnte=0; for(int i=0; i<n; i++){ int tmp; cin >> tmp; if(tmp%2==0)cnte++; else cnto++; } if(cnto%2==1){ cout << "NO"; return 0; } if((cnto/2+cnte)%2==1){ cout << "NO"; return 0; } else c...
a.cc: In function 'int main()': a.cc:7:15: error: 'cnte' was not declared in this scope; did you mean 'cnto'? 7 | int cnto=0; cnte=0; | ^~~~ | cnto
s135901439
p03807
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; long long int a[n],even=0,,odd=0; for(int i=0;i<n;i++){ cin>>a[i]; if(a[i]%2==0) even++; else odd++; } if(odd==1 || odd%2==0) cout<<"YES"; else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:7:29: error: expected unqualified-id before ',' token 7 | long long int a[n],even=0,,odd=0; | ^
s734580053
p03807
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int n,kisu=0,gusu=0; cin >> n; long long int a[i]; for (int i=0;i<n;i++){ cin >> a[i]; if(a[i]%2==1)kisu++; else gusu++; } if (kisu%2==0)cout << "YES" <<endl; else cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:6:19: error: 'i' was not declared in this scope 6 | long long int a[i]; | ^ a.cc:8:12: error: 'a' was not declared in this scope 8 | cin >> a[i]; | ^
s877976089
p03807
C++
#include<bits/stdc++.h> const int maxn=1e5+7; int main() { int n,a,cntj=0; bool o=0; scanf("%d",&n); if(n==0) { printf("NO") return 0; } for(int i=1;i<=n;i++) { scanf("%d",&a); if(a&1) cntj++; else o=1; if(cntj==2) o=1,cntj=0; } if(cntj&&o) printf("NO"); else printf("YES"); return 0; }
a.cc: In function 'int main()': a.cc:10:29: error: expected ';' before 'return' 10 | printf("NO") | ^ | ; 11 | return 0; | ~~~~~~
s186378317
p03807
C++
#include <iostream> #include<vector> #include<algorithm> #include<string> #include<map> #include<set> #include<stack> #include<queue> #include<math.h> using namespace std; typedef long long ll; typedef vector<int> VI; #define REP(i,n) for(int i=0;i<n;i++) #define eREP(i,n) for(int i=0;i<=n;i++) #define FOR(i,a,b) for(i...
a.cc: In function 'int main()': a.cc:42:12: error: 'a' was not declared in this scope 42 | if(a%2==1)cout<<"NO"<<endl; | ^
s677043516
p03807
C++
#include <iostream> #include<vector> #include<algorithm> #include<string> #include<map> #include<set> #include<stack> #include<queue> #include<math.h> using namespace std; typedef long long ll; typedef vector<int> VI; #define REP(i,n) for(int i=0;i<n;i++) #define eREP(i,n) for(int i=0;i<=n;i++) #define FOR(i,a,b) for(i...
a.cc: In function 'int main()': a.cc:39:27: error: 'cnt' was not declared in this scope; did you mean 'int'? 39 | if(a%2==1)cnt++; | ^~~ | int a.cc:41:12: error: 'a' was not declared in this scope 41 | if(a%2==1)cout<<"NO"<<en...
s374768370
p03807
C++
#include<bits/stdc++.h> using namespace std; int a[114514]; int n; signed main() { cin >> n; rep(i, n)cin >> a[i]; int ans = 0; rep(i, n) { if (a[i] % 2 == 1)ans++; } if (ans % 2 == 1)puts("NO"); else puts("YES"); getchar(); getchar(); return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: 'i' was not declared in this scope 6 | rep(i, n)cin >> a[i]; | ^ a.cc:6:9: error: 'rep' was not declared in this scope 6 | rep(i, n)cin >> a[i]; | ^~~
s076093830
p03807
C++
#include<bits/stdc++.h> int a[114514]; int n; signed main() { cin >> n; rep(i, n)cin >> a[i]; int ans = 0; rep(i, n) { if (a[i] % 2 == 1)ans++; } if (ans % 2 == 1)puts("NO"); else puts("YES"); getchar(); getchar(); return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin >> n; | ^~~ | 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:...
s883074519
p03807
C
#include<stdio.h>int main(){ long n,a,c=0; scanf("%ld",&n); while(n-->0){ scanf("%ld",&a); c+=a%2; } if(c%2==0)puts("YES"); else if(n%2==1)puts("YES"); else puts("NO"); return 0; }
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>int main(){ | ^~~ main.c:3:7: error: expected declaration specifiers or '...' before string constant 3 | scanf("%ld",&n); | ^~~~~ main.c:3:13: error: expected declaration specifiers or '...' b...
s662462218
p03807
C
#include<stdio.h>int main(){long n,a,c=0;scanf("%ld",&n);while(n-->0){scanf("%ld",&a);c+=a%2;}if(c%2==0)puts("YES");else if(n%2==1)puts("YES");else puts("NO");return 0;}
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>int main(){long n,a,c=0;scanf("%ld",&n);while(n-->0){scanf("%ld",&a);c+=a%2;}if(c%2==0)puts("YES");else if(n%2==1)puts("YES");else puts("NO");return 0;} | ^~~ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../...
s262541386
p03807
C
#include<stdio.h>int main(){long n,a,c=0;scanf("%ld",&n);while(n-->0){scanf("%ld",&a);c+=a%2;}if(c%2==0)puts("YES");else if(n%2==1)puts("YES");else puts("NO");}
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>int main(){long n,a,c=0;scanf("%ld",&n);while(n-->0){scanf("%ld",&a);c+=a%2;}if(c%2==0)puts("YES");else if(n%2==1)puts("YES");else puts("NO");} | ^~~ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86...
s639583650
p03807
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pll; #define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i)) #define REP(i, n) FOR(i, n, 0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll)1e15; ll A[100005]; int main() { int N; ...
a.cc: In function 'int main()': a.cc:7:22: error: expected ',' or ';' before 'for' 7 | #define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i)) | ^~~ a.cc:8:19: note: in expansion of macro 'FOR' 8 | #define REP(i, n) FOR(i, n, 0) | ^~~ a.cc:20:16: note: in expa...
s128217960
p03807
C++
#include <iostream> using namespace std; int main(){ int N,a[1000000000,sum]; cin >> N; for (int i=0; i<N; ++i) { cin >> a[i]; sum += a[i]; } if (sum%2==0) cout << "YES" << endl; else cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:5:23: error: expected ']' before ',' token 5 | int N,a[1000000000,sum]; | ^ | ] a.cc:5:27: error: expected initializer before ']' token 5 | int N,a[1000000000,sum]; | ^ a.cc:8:16:...
s281552238
p03807
C++
#include <iostream> using namespace std; int main(){ int N,a[1000000000]; cin >> N; for (int i=0; i<N; ++i) cin >> a[i]; for (int i=0; i<N; ++i) int sum += a[i]; if (sum%2==0) cout << "YES" << endl; else cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:8:37: error: expected initializer before '+=' token 8 | for (int i=0; i<N; ++i) int sum += a[i]; | ^~ a.cc:9:9: error: 'sum' was not declared in this scope 9 | if (sum%2==0) cout << "YES" << endl; | ^~~
s056210804
p03807
C++
#include <iostream> using namespace std; int main(){ int N,a[1000000000]; cin >> N; for (int i=0; i<N; ++i) cin >> a[i]; int counter =0; if (a[i]%2!=0) ++counter; if (counter%2==0) cout << "YES" << endl; else cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:9:11: error: 'i' was not declared in this scope 9 | if (a[i]%2!=0) ++counter; | ^
s462699205
p03807
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector <int> A(N); for (int i = 0; i < N; i++) cin >> A.at(i); int x = 0; for (int i = 0; i < N; i++) { if (A.at(i) % 2 = 0) {} else x++; } if (x % 2 = 0) cout << "YES" << endl; else cout << "NO" << ...
a.cc: In function 'int main()': a.cc:12:17: error: lvalue required as left operand of assignment 12 | if (A.at(i) % 2 = 0) {} | ~~~~~~~~^~~ a.cc:16:9: error: lvalue required as left operand of assignment 16 | if (x % 2 = 0) | ~~^~~
s414370790
p03807
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector <int> A(N); for (int i = 0; i < N; i++;) cin >> A.at(i); int x = 0; for (int i = 0; i < N; i++;) { if (A.at(i) % 2 = 0) {} else x++; } if (x % 2 = 0) cout << "YES" << endl; else cout << "NO" <...
a.cc: In function 'int main()': a.cc:8:29: error: expected ')' before ';' token 8 | for (int i = 0; i < N; i++;) | ~ ^ | ) a.cc:8:30: error: expected primary-expression before ')' token 8 | for (int i = 0; i < N; i++;) | ...
s084395146
p03807
C++
#include<iostream> #include<algorithm> #include<map> #include<set> #include<string> #include<vector> using namespace std; using ll = long long; using lli = long long int; ll MM = 1000000000; ll mod = MM + 7; #define INF (ll)1e18 #define pi acos(-1.0) signed main(){ ll n; cin >> n; ll a[100001]; ll sum = 0; ...
a.cc: In function 'int main()': a.cc:24:10: error: 'i' was not declared in this scope 24 | if(a[i]%2 != 0) ans = "NO"; | ^
s215590392
p03807
C++
#include <bits/stdc++.h> //author:tourist //date:2018/11/17 //titile:AGC 010 E using namespace std; const int N = 2010; const int NN = 2010; unsigned long long one = 1; unsigned long long g[N][NN]; unsigned long long was[NN]; bool alive[N]; bool can_put[N]; int a[N]; int x[N]; int main() { int n; scanf("%d", ...
a.cc: In function 'int main()': a.cc:77:9: error: 'it' was not declared in this scope; did you mean 'i'? 77 | if (it > 0) putchar(' '); | ^~ | i
s326902209
p03807
C++
#include<bits/stdc++.h> int main() { int N,A[100010],ans=0 ; for (int i = 0; i < 100010; i++) { A[i] = 0; } for (int i = 0; i < N; i++) { cin >> A[i]; } for (int i = 0; i < N; i++) { if (A[i] % 2 != 0) { ans++; } } if (ans % 2 == 0) { cout << "YES" << endl; } else { cout << "NO" << endl; } re...
a.cc: In function 'int main()': a.cc:8:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | cin >> A[i]; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /...
s591013075
p03807
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<iomanip> #include<math.h> #include<complex> #include<queue> #include<deque> #include<stack> #include<map> #include<set> #include<bitset> using namespace std; #define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i ) #define rep(i,n) REP(i...
a.cc: In function 'int main()': a.cc:30:16: error: expected initializer before '++' token 30 | int count++; | ^~ a.cc:32:26: error: no post-increment operator for type 32 | if(a[i]%2==1)count++; | ^~ a.cc:34:15: error: invalid operands of types '<un...
s670907215
p03807
C++
#include<iostream> using namespace std; int n; int a[100001]; int main(){ cin>>n; int ans=0; for(int i=0; i<n;i++){ cin>>a[i]; ans=(ans+a[i])%2; } if(ans) cout<<"NO"<<endl; else cout<<"YES"<<endl; return 0;
a.cc: In function 'int main()': a.cc:15:10: error: expected '}' at end of input 15 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s848622881
p03807
C++
<iostream> #include <stdio.h> #include <algorithm> #include <string> #include <math.h> #include <vector> using namespace std; int main() { int N; long int tmp; int e_num=0, o_num=0; int i; cin >> N; for(i=0; i<N; i++){ scanf("%ld",&tmp); if(tmp%2) o_num++; else e_num++; } if(o_num%2==...
a.cc:1:2: error: expected unqualified-id before '<' token 1 | <iostream> | ^ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/bits/stl_algo.h:71, from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/stdlib.h:98:8: e...
s141726211
p03807
C++
#include <bits/stdc++.h> using namespace std; int main() { int t,n,i; cin>>n; vector<int> v(n,0); for(i=0;i<n;i++) cin>>v[i]; int cnt=0; for(i=0;i<n;i++) { if(v[i] %2 ==0) cnt++; } if(cnt&1) cout...
a.cc:22:9: error: unterminated comment 22 | /*if(n==3 || n==4 ) | ^ a.cc: In function 'int main()': a.cc:21:30: error: expected '}' at end of input 21 | cout<<"Second\n"; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s827194420
p03807
C++
n = input() v = map(int, raw_input().split(' ')) if sum([i % 2 for i in v]) % 2 == 0: print "YES" else: print "NO"
a.cc:1:1: error: 'n' does not name a type 1 | n = input() | ^
s198606698
p03807
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,odd=0,N; cin >> N; for(int i=0;i<N:i++){ cin >> a; if(a%2==1){odd++;} } if(odd%2==1){cout << "NO" << endl;} else{cout << "YES" << endl;} return 0; }
a.cc: In function 'int main()': a.cc:7:15: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions] 7 | for(int i=0;i<N:i++){ | ^ a.cc:7:18: error: found ':' in nested-name-specifier, expected '::' 7 | for(int i=0;i<N:i++){...
s646803091
p03807
C++
#include<iostream> using namespace std; int main() { int n,sum=0; cin>>n; for(int i=1;i<=n;++i){ int a; cin>>a; sun+=a; } cout<<(sum&1)?"NO":"YES"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:1: error: 'sun' was not declared in this scope; did you mean 'sum'? 10 | sun+=a; | ^~~ | sum a.cc:12:29: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<' 12 | cout<<(sum&1)?"NO":"YES"<<endl;...
s637503879
p03807
C++
#include <iostream> using namespace std; int main(){ int n,k[112345]; cin>>n; for(int i=0;i<n;i++){ cin>>k[i]; sum+=k[i]; } if(sum%2==0) cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:8:5: error: 'sum' was not declared in this scope 8 | sum+=k[i]; | ^~~ a.cc:10:6: error: 'sum' was not declared in this scope 10 | if(sum%2==0) cout<<"YES"<<endl; | ^~~
s508800694
p03807
C++
#include <bits/stdc++.h> #define pb push_back #define REP(i, n) for (signed long long i = 0; i < (n); i++) #define MOD 1000000007 #define bitcnt(a) (ll) __builtin_popcount((a)) using namespace std; typedef long long ll; typedef pair<ll, ll> P; int main() { ll n, cnt = 0; cin >> n; REP(i, n) { ll h; cin >...
a.cc: In function 'int main()': a.cc:18:12: error: 'h' was not declared in this scope 18 | cout << (h % 2 ? "NO" : "YES") << endl; | ^
s522720160
p03807
C++
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<string> #include<stack> #include<queue> #include<vector> #include<algorithm> #include<iomanip> #include<utility> typedef long long int ll; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) for(int i=0;i<signed(n);i++) #define EREP...
a.cc: In function 'int main()': a.cc:58:35: error: lvalue required as left operand of assignment 58 | else if(B[(i+1)%N]-B[i]!=0&&B[(i+1)%N]-B[i]=!N)f=false; | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s196996893
p03807
C++
#include<bits/stdc++.h> using namespace std; int n; int main() { cin >> n; for(int i = 1;i <= n; i++) { int x; cin >> x; if(x % 2 == 1) cnt ++; } if(cnt % 2 == 1) cout << "YES"; else cout << "NO"; return 0; }
a.cc: In function 'int main()': a.cc:13:16: error: 'cnt' was not declared in this scope; did you mean 'int'? 13 | if(x % 2 == 1) cnt ++; | ^~~ | int a.cc:15:4: error: 'cnt' was not declared in this scope; did you mean 'int'? 15 | if(cnt % 2 == 1) cout << "YES"; | ...
s410131800
p03807
C++
#pragma comment(linker, "/stack:20000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #include<iostream> using namespace std; typedef long long ll; #define F first #define S second #define mp make_pair #define pb push_back #define pii pair<int,int> #defi...
a.cc:49:1: error: '\U00000415\U00000449\U00000451' does not name a type 49 | Ещё | ^~~
s647173855
p03807
C++
#pragma comment(linker, "/stack:20000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #include <stdio.h> #include <string> #include <bits/stdc++.h> #include <x86intrin.h> using namespace std; typedef long long ll; #define F first #define S second #define mp make_pai...
In file included from /usr/include/c++/14/string:43, from a.cc:6: /usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()': /usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <templa...
s609434578
p03807
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; vector<int> vec (N); int count = 0; for(int i = 0;i<N;i++){ cin >> vec.at(i); if(vec.at(i) % 2 = 1){ count++; } } if(count % 2 = 1){ cout << "NO" << endl; } else{ cout << "YES" << endl; } }
a.cc: In function 'int main()': a.cc:11:30: error: lvalue required as left operand of assignment 11 | if(vec.at(i) % 2 = 1){ | ~~~~~~~~~~^~~ a.cc:15:18: error: lvalue required as left operand of assignment 15 | if(count % 2 = 1){ | ~~~~~~^~~
s248277069
p03807
C++
#include <iostream> using namespace std; int n, sum = 0; int main(void){ // Your code here! cin >> n; for (int i = 0; i < n; i++) { int a; cin >> a; sum += a; } if (sum % 2 == 0) cout << "YES" << endl; else (sum % 2 == 1) cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:13:24: error: expected ';' before 'cout' 13 | else (sum % 2 == 1) cout << "NO" << endl; | ^~~~~ | ;
s692401163
p03807
C++
#include<iostream> using namespace std; int main(){ int n; cin>>n; int A[100000]; for(int i=0;i<n;i++) cin>>A[i]; for(int i=0;i<n;i++) A[i]=A[i]%2; int num[2]; for(int i=0;i<n;i++) num[A[i]]++; if(num[1]%2==1) cout<<"YES" else cout<<"NO" }
a.cc: In function 'int main()': a.cc:14:32: error: expected ';' before 'else' 14 | if(num[1]%2==1) cout<<"YES" | ^ | ; 15 | else cout<<"NO" | ~~~~
s091533392
p03807
C++
#include <bits/stdc++.h> using namespace std; typedef long long int llint; int main(){ int n, a, i; ll ans=0; bool can=false; cin>>n; for(i=0; i<n; i++){ cin>>a; if(a%2==0) ans+=2; else ans++; } while(ans>0){ if(ans==1){ can=true; break; } if(ans%2==0) ans/=2; else break; } can ? cout<<"YE...
a.cc: In function 'int main()': a.cc:7:9: error: 'll' was not declared in this scope 7 | ll ans=0; | ^~ a.cc:12:28: error: 'ans' was not declared in this scope; did you mean 'abs'? 12 | if(a%2==0) ans+=2; | ^~~ | ...
s635233217
p03807
C++
#include <iostream> using namespace std; int a,n,cnt=0; int main(){ cin>>n; for(int i=-1;++i-n;){ cin>>a; if(a&1)cnt=cnt&1?0:1; } cout<<(cnt&1)?"No":"Yes"<<endl; }
a.cc: In function 'int main()': a.cc:10:27: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<' 10 | cout<<(cnt&1)?"No":"Yes"<<endl; | ~~~~~^~~~~~
s093601314
p03807
C++
#include <iostream> using namespace std; int a,n,cnt=0; int main(){ cin>>n; for(int i=-1;++i-n;){ cin>>a; if(a&1)cnt=cnt&1?0:1; } cout<<cnt&1?"No":"Yes"<<endl; }
a.cc: In function 'int main()': a.cc:10:12: error: no match for 'operator&' (operand types are 'std::basic_ostream<char>' and 'int') 10 | cout<<cnt&1?"No":"Yes"<<endl; | ~~~~~~~~~^~ | | | | | int | std::basic_ostream<char> a.cc:10:12: note: candidate: 'operator&(...
s930170676
p03807
C++
#include <iostream> int a,n,cnt=0; int main(){ cin>>n; for(int i=-1;++i-n;){ cin>>a; if(a&1)cnt=cnt&1?0:1; } cout<<cnt&1?"No":"Yes"<<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>>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 stand...
s235501458
p03807
C++
#include<bits/stdc++.h> using namespace std; int main() { #define ll long long
a.cc: In function 'int main()': a.cc:4:2: error: expected '}' at end of input 4 | { | ~^
s215051014
p03807
C++
#include<iostream> int main(){ } return 0;
a.cc:4:1: error: expected unqualified-id before 'return' 4 | return 0; | ^~~~~~
s422135920
p03807
C++
#include <iostream> #include <algorithm> using namespace std; int main() { int n, a[100010]; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; int sum = 0; for (auto i : a) sum += a; cout << (sum % 2 ? "NO" : "YES") << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:26: error: invalid conversion from 'int*' to 'int' [-fpermissive] 13 | for (auto i : a) sum += a; | ~~~~^~~~ | | | int*
s759061327
p03807
C++
#include <bits/stdc++.h> using namespace std; #define int long long using ll=long long; using vi=vector<int>; using pii=pair<int,int>; #define ALL(c) begin(c),end(c) #define RALL(c) rbegin(c),rend(c) #define ITR(i,b,e) for(auto i=(b);i!=(e);++i) #define FORE(x,c) for(auto &x:c) #define REPF(i,a,n) for(int i=a,i##len=(i...
a.cc:18: error: unterminated #else 18 | #ifdef int
s898259895
p03807
C++
#include<bits/stdc++.h> using namespace std; int main() { int n; int a; int cnt=0; cin >> n; for(int i = 0; i<n; i++){ cin >> a; if(a%2) cnt++; } if(cnt%2) cout << “NO” << endl; else cout << “YES” << endl; return 0; }
a.cc:15:21: error: extended character “ is not valid in an identifier 15 | if(cnt%2) cout << “NO” << endl; | ^ a.cc:15:21: error: extended character ” is not valid in an identifier a.cc:16:16: error: extended character “ is not valid in an identifier 16 | else cout << “YES” << endl; ...
s345388330
p03807
C++
#include <iostream> using namespace std; int main(){ int N; cin >> N; int odd = 0; for(int i = 0; i < N; i++){ int a; cin >> a: if(a % 2 == 1){ odd++; } } if(odd%2 == 1){ cout << "NO" << endl; } else { cout << "YES" << endl;} }
a.cc: In function 'int main()': a.cc:9:13: error: expected ';' before ':' token 9 | cin >> a: | ^ | ;
s989417707
p03807
C++
#!/usr/bin/env python3 N = int(input()) A = list(map(int, input().split())) cnt = 0 for a in A: cnt += a % 2 print('YES' if (cnt % 2 == 0) else 'NO')
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python3 | ^ a.cc:10:7: warning: multi-character character constant [-Wmultichar] 10 | print('YES' if (cnt % 2 == 0) else 'NO') | ^~~~~ a.cc:10:36: warning: multi-character character constant [-Wmultichar] 10 | print('YES...
s237631978
p03807
C++
int main() { cout << "YES"; return 0; }
a.cc: In function 'int main()': a.cc:3:3: error: 'cout' was not declared in this scope 3 | cout << "YES"; | ^~~~
s086079620
p03807
C++
#include <iostream> using namespace std; int main(){ int N; cin >> N; int oddnumbers = 0; for(int i = 0; i < N; i++){ int input; cin >> input; if(input % 2 == 1){ oddnumbers++; } } if(addnumbers % 2 == 0){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:15:12: error: 'addnumbers' was not declared in this scope; did you mean 'oddnumbers'? 15 | if(addnumbers % 2 == 0){ | ^~~~~~~~~~ | oddnumbers
s775333817
p03807
C++
#include <iostream> using namespace std; int main(){ int N; cin >> N; oddnumbers = 0; for(int i = 0; i < N; i++){ int input; cin >> input; if(input % 2 == 1){ oddnumbers++; } } if(addnumbers % 2 == 0){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: 'oddnumbers' was not declared in this scope 7 | oddnumbers = 0; | ^~~~~~~~~~ a.cc:15:12: error: 'addnumbers' was not declared in this scope 15 | if(addnumbers % 2 == 0){ | ^~~~~~~~~~
s855133389
p03807
C++
int main() { long long int n, a[100000], k = 0; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; if (a[i] % 2 == 1) { k++; } } if (k % 2 == 0) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin >> n; | ^~~ a.cc:11:17: error: 'cout' was not declared in this scope 11 | cout << "YES" << endl; | ^~~~ a.cc:11:34: error: 'endl' was not declared in this scop...
s392908482
p03807
Java
import java.util.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int N=in.nextInt(); int sum=0; for (int i = 0; i < N; i++) { if (in.nextInt()%2==1) { sum++; } } if(sum...
Main.java:4: error: class Solution is public, should be declared in a file named Solution.java public class Solution { ^ 1 error
s645630505
p03807
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int N=in.nextInt(); int sum=0; for (int i = 0; i < N; i++) { if (in.nextInt()%2==1) { sum++; } } if(sum%2==...
Main.java:20: error: class, interface, enum, or record expected } ^ 1 error
s952789378
p03807
C++
n = input() A = map(int, raw_input().strip().split()) A = filter(lambda x: x % 2 == 1, A) m = len(A) print "YES" if (m % 2 == 0) else "NO"
a.cc:1:1: error: 'n' does not name a type 1 | n = input() | ^
s464749127
p03807
C++
#include<cstring> #include<cstdlib> #include<cstdio> #include<cmath> #include<iostream> #define N 3100 #define inf (1e9)+1 using namespace std; struct node{int y,nex;}a[2*N]; int f[N],g[N],n,fir[N],len,d[N],num,A[N]; void ins(int x,int y) { a[++len].y=y;a[len].nex=fir[x];fir[x]=len; } void dfs(int x,int fa) { f[x]=d[...
a.cc: In function 'int main()': a.cc:60:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 60 | sort(A+1,A+num+1); | ^~~~ | sqrt
s206532352
p03807
C
#include <stdio.h> int main(void) {
main.c: In function 'main': main.c:2:1: error: expected declaration or statement at end of input 2 | int main(void) { | ^~~
s199192855
p03807
C++
#include<iostream> using namespace std; int main() { int sum = 0; int n; cin >> n; for (int i = 0; i < n; i++){ int a; cin >> a; if (a % 2 == 1)sum++; } if (sum % 2 == 1)cout << "NO\n"; else cot << "YES\n"; }
a.cc: In function 'int main()': a.cc:10:47: error: 'cot' was not declared in this scope 10 | if (sum % 2 == 1)cout << "NO\n"; else cot << "YES\n"; | ^~~
s235606565
p03807
C++
#include <bits/stdc++.h> using namespace std; const int N = 1234567; int a[N], d[N]; int main() { int n; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", a + i); } a[n] = a[0]; int mx = 0; for (int i = 0; i < n; i++) { d[i] = a[i + 1] - a[i]; mx = max(mx, d[i]); } long long s...
a.cc: In function 'int main()': a.cc:35:23: error: 'total' was not declared in this scope 35 | if (need > sum || ((total - need) % useless)) { | ^~~~~
s069324426
p03807
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s099149361
p03807
Java
import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashSet; import java.util.Scanner; import java.util.Stack; public class B348 { /** * @param args */ static PrintWriter out = new PrintWriter(System.out); public static void main(S...
Main.java:10: error: class B348 is public, should be declared in a file named B348.java public class B348 { ^ 1 error
s620047037
p03807
Java
iimport java.util.*; class Main{ public static void main(String[] args){ //declare Scanner in = new Scanner(System.in); ArrayList<Integer> array = new ArrayList<Integer>(); int a,b; //imput b = 0; a = in.nextInt(); for (int i=0;i<a;i++){ b += Integer.parseInt(in.next()); } ...
Main.java:1: error: class, interface, enum, or record expected iimport java.util.*; ^ 1 error
s625904003
p03807
Java
import java.util.*; class Main{ public static void main(String[] args){ //declare Scanner in = new Scanner(System.in); ArrayList<Integer> array = new ArrayList<Integer>(); int a,b; //imput int b = 0; a = in.nextInt(); for (int i=0;i<a;i++){ b += Integer.parseIn(in.next)); } ...
Main.java:13: error: ';' expected b += Integer.parseIn(in.next)); ^ 1 error
s412005575
p03807
C
#include<stdio.h> int main() { int a,c,d; int b[]; int tmp; scanf("%d",&a); for(c=0;c<a;c++) { scanf("%d",&b[c]); } for(c=0;c<a;c++) { if(b[c]%2==0) { d++; } } if(d%2==0) { printf("YES"); } else{ printf("NO"); } }
main.c: In function 'main': main.c:6:13: error: array size missing in 'b' 6 | int b[]; | ^
s622450726
p03807
C++
#define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define ALL(a) (a).begin(),(a).end() #define SET(a,c) memset(a,c,sizeof a) #define CLR(a) memset(a,0,sizeof a) #define OUT(x) cout<<x<<endl;...
a.cc: In function 'int main()': a.cc:10:21: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | #define I(x) int x; scanf_s("%d",&x); | ^~~~~~~ a.cc:32:9: note: in expansion of macro 'I' 32 | I(N); | ^
s077545109
p03807
C++
#define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define ALL(a) (a).begin(),(a).end() #define SET(a,c) memset(a,c,sizeof a) #define CLR(a) memset(a,0,sizeof a) #define OUT(x) cout<<x<<endl;...
a.cc:29:1: error: '::main' must return 'int' 29 | void main() | ^~~~ a.cc: In function 'int main()': a.cc:10:21: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | #define I(x) int x; scanf_s("%d",&x); | ^~~~~~~ a.cc:31:9: note: in expansion of macro 'I' ...
s007421572
p03807
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) (x).begin(),(x).end() int A[(int)1e5 + 10]; int main() { int n; cin >> n; for(int i=1;i;<=n;i++){ cin >> A[i]; } bool ok = 1,_ok = 1; for(int i=1;i<=n;i++){ ok &= (A[i]&1); _ok &= (A[...
a.cc: In function 'int main()': a.cc:15:19: error: expected primary-expression before '<=' token 15 | for(int i=1;i;<=n;i++){ | ^~ a.cc:15:22: error: expected ')' before ';' token 15 | for(int i=1;i;<=n;i++){ | ~ ^ | ) a.cc:15:23:...
s243664370
p03807
C++
fsad
a.cc:1:1: error: 'fsad' does not name a type 1 | fsad | ^~~~
s160614456
p03807
C++
atcoder010A.cpp #include <bits/stdc++.h> #define REP(i, n) for(int i = 0;i < n;i++) // ex)REP(i,10) i=0~i=9 #define REPR(i, n) for(int i = n;i >= 0;i--) // ex)REPR(i,10) i=10~i=0 #define FOR(i, m, n) for(int i = m;i < n;i++) //ex)FOR(i,3,10) i=3~i=9 #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) so...
a.cc:10:27: error: extended character   is not valid in an identifier 10 | #define pb(a) push_back(a)  | ^ a.cc:33:9: warning: multi-character character constant [-Wmultichar] 33 | cout << 'NO' << endl; | ^~~~ a.cc:35:9: warning: multi-character character constant [-W...
s197015791
p03807
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, x,t=0; cin>>n; for (i=0;i<n;i++){ cin>>x; if (x%2)t++; } if (t%2)cout<<"NO\n";else cout<<"YES\n"; }
a.cc: In function 'int main()': a.cc:7:6: error: 'i' was not declared in this scope 7 | for (i=0;i<n;i++){ | ^
s435614379
p03807
C++
#include <iostream> int main() { int n, m, cnt=0; std::cin >> n; for (int i=0; i<n; i++) { std::cin >> m; if ( m%2 == 1 ) { cnt++; } } if ( cnt%2 == 0 ) { std::cout << "YES" << std::endl; } else { std::cout << "NO" << std::endl; }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s599970100
p03807
C++
#include <iostream> using namespace std; int main(){ int N; N = 3; cin >> N; unsigned int odd, even; odd = even = 0; //vector<int> A; for(int i = 0;i<N;i++){ int tmp; cin >> tmp; if (tmp % 2 == 0)even++; else odd++; //A.push_back(tmp); } if ((odd % 2) != 0){ cout << "NO" << endl; return; } else{ ...
a.cc: In function 'int main()': a.cc:18:52: error: return-statement with no value, in function returning 'int' [-fpermissive] 18 | if ((odd % 2) != 0){ cout << "NO" << endl; return; } | ^~~~~~ a.cc:26:59: error: return-statement with no value, in funct...
s796645766
p03807
C++
#include <iostream.h> using namespace std; int main(){ int N; cin >> N; unsigned int odd, even; odd = even = 0; //vector<int> A; for(int i = 0;i<N;i++){ int tmp; cin >> tmp; if (tmp % 2 == 0)even++; else odd++; //A.push_back(tmp); } if (odd % 2 != 0){ cout << "NO" << endl; } else if ((odd / 2 + even...
a.cc:1:10: fatal error: iostream.h: No such file or directory 1 | #include <iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s078450124
p03807
C++
#import<iostream> int c,a,i;main(){while(std::cin>>a)i++&&c^=a%2;puts(c?"NO":"YES");}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int c,a,i;main(){while(std::cin>>a)i++&&c^=a%2;puts(c?"NO":"YES");} | ^~~~ a.cc: In function 'i...
s480070893
p03807
C++
#import<iostream> int c,a,i;main(){while(std::cin>>a)i++?c+=a%2:;puts(c%2?"NO":"YES");}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int c,a,i;main(){while(std::cin>>a)i++?c+=a%2:;puts(c%2?"NO":"YES");} | ^~~~ a.cc: In function ...
s151391752
p03807
C++
#import<iostream> int c,a,i;main(){for(;std::cin>>a;!i++&&c+=a%2);puts(c%2?"NO":"YES");}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int c,a,i;main(){for(;std::cin>>a;!i++&&c+=a%2);puts(c%2?"NO":"YES");} | ^~~~ a.cc: In function...
s471968246
p03807
C++
#include<iostream> int a,f; int main() { fgets(&a,5,0); for (; std::cin>>a; f ^= a & 1); puts(f?"NO\n":"YES\n"); }
a.cc: In function 'int main()': a.cc:4:15: error: cannot convert 'int*' to 'char*' 4 | fgets(&a,5,0); | ^~ | | | int* In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, ...
s402665802
p03807
C++
#import<iostream> int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");} | ^~~~~~ a.cc:1:19: warning: extra tokens at end of #import directive 1 | #import<iostream> int c,a;main(){for(std::cin>>a;std::cin>>a;c+...
s744791730
p03807
C++
#import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");} | ^~~~~~ a.cc:1:22: warning: extra tokens at end of #import directive 1 | #import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a...
s349272806
p03807
C++
#include<iostream> int a,f; int main() { scanf("%*d"); gets(&a); for (; std::cin>>a; f ^= a & 1); puts(f?"NO\n":"YES\n"); }
a.cc: In function 'int main()': a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(&a); | ^~~~ | getw
s770417434
p03807
C++
#import<map> int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<map> | ^~~~~~ a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");} | ^~~~ a.cc: In function 'int ma...
s987673799
p03807
C++
#include<iostream> #include<set> #include<iterator> #include<algorithm> #include<string> #include<Windows.h> #include<map> #include<vector> using namespace std; int main() { //RECT rc; //GetClientRect(GetConsoleWindow(), &rc); //SetWindowPos(GetConsoleWindow(), HWND_TOP, 700, 200, rc.right , rc.bottom, 0x0040); ...
a.cc:6:9: fatal error: Windows.h: No such file or directory 6 | #include<Windows.h> | ^~~~~~~~~~~ compilation terminated.
s248218722
p03807
C++
#include <iostream> #include <vector>   using namespace std;   int main(){ long long int N; vector<long long int> a; long long int b = 0; long long int sum = 0; long long int c = 0;   cin >> N; for(long long int i = 0; i < N; i++){ cin >> b; a.push_back(b); sum += b; }   long long int tria...
a.cc:3:1: error: extended character   is not valid in an identifier 3 |   | ^ a.cc:5:1: error: extended character   is not valid in an identifier 5 |   | ^ a.cc:12:1: error: extended character   is not valid in an identifier 12 |   | ^ a.cc:19:1: error: extended character   is not valid in ...
s911627140
p03807
C
#include<stdio.h> int en; int on; int N; void input(){ int i, t; en = 0; on = 0; scanf("%d", &N); for( i = 0; i < N; i++ ){ scanf("%d", &t); if( t % 2 ){ en++; }else{ on++; } } return; } int main(){ input(); if( on % 2 == 0 || on == 1 && en == 0) ){ printf("YES\n"); }else{ printf("NO\n");...
main.c: In function 'main': main.c:25:48: error: expected statement before ')' token 25 | if( on % 2 == 0 || on == 1 && en == 0) ){ | ^ main.c:27:10: error: 'else' without a previous 'if' 27 | }else{ | ^~~~
s309768932
p03807
C
#include<stdio.h> int en; int on; int N; void input(){ int i; en = 0; on = 0; scanf("%d", &N); for( i = 0; i < N; i++ ){ scanf("%d", &t); if( t % 2 ){ en++; }else{ on++; } } return; } int main(){ input(); if( on > 3 || (on == 1 && en > 0) ){ printf("NO\n"); }else{ printf("YES\n"); } ret...
main.c: In function 'input': main.c:13:30: error: 't' undeclared (first use in this function) 13 | scanf("%d", &t); | ^ main.c:13:30: note: each undeclared identifier is reported only once for each function it appears in
s849060651
p03807
C++
#include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <numeric> using namespace std; #define forn(i,n) for (int i = 0; i < int(n); ++i) #define forsn(i,x,y) for(long long i = (x) ; i <= (y) ; ++i) typedef long long ll; typedef long double ld; ...
a.cc: In function 'int main()': a.cc:33:24: error: expected ';' before 'if' 33 | ave = (n * (n+1)) / 2 | ^ | ; 34 | if(total % ave != 0) { | ~~
s273208148
p03807
C
#include <stdio.h> #include <math.h> int main() { int N; int A; int odd; scanf("%d",&N); for(i=0; i<N; i++) { scanf("%d",&A); if ((A%2)==0) odd++; } if(mod(odd%2)==1) { printf("YES"); }else{ printf("NO"); } return 0; }
main.c: In function 'main': main.c:12:7: error: 'i' undeclared (first use in this function) 12 | for(i=0; i<N; i++) | ^ main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in main.c:18:6: error: implicit declaration of function 'mod'; did you mean 'fmod'? [-...
s800218735
p03807
C
#include<stdio.h> int main() { int N; int num[10000]; int i; scanf("%d",&N); for(i==0;i<N;i++) scanf("%d",&num[i]); int count=0; for(i==0;i<N;i++) if(num%2==1) count++; if(count%2==0) printf("YES\n"); else printf("NO\n"); return 0; }
main.c: In function 'main': main.c:12:9: error: invalid operands to binary % (have 'int *' and 'int') 12 | if(num%2==1) | ~~~^ | | | int *
s356625990
p03807
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int e=0;o=0; for(int i=0;i<n;i++){ int x; cin>>x; if(x%2==0){ e++; }else{ o++; } if(o%2==1){ cout<<"NO"; }else{ cout<<"YES"; } } return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: 'o' was not declared in this scope 7 | int e=0;o=0; | ^
s610229919
p03807
Java
import java.util.Scanner; /** * Created by srikanth on 04-02-2017. */ public class Addition { public static void main(String[] args) { Scanner scan=new Scanner(System.in); int even=0,odd=0; int N=scan.nextInt(); while(N-->0){ int i=scan.nextInt(); if(i%2=...
Main.java:8: error: class Addition is public, should be declared in a file named Addition.java public class Addition { ^ 1 error
s679703906
p03807
C++
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def readln(ch): _res = list(map(int,str(input()).split(ch))) return _res n = int(input()) a = readln(' ') ans = 0 for x in a: if x % 2 == 1: ans = ans + 1 if ans % 2 == 1: print('YES') else: print('NO')
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python3 | ^ a.cc:2:3: error: invalid preprocessing directive #- 2 | # -*- coding: utf-8 -*- | ^ a.cc:15:11: warning: multi-character character constant [-Wmultichar] 15 | print('YES') | ^~~~~ a.cc:17:11:...
s847183323
p03807
Java
package grand_04_02_17; import java.util.Scanner; /** * Created by srikanth on 04-02-2017. */ public class Addition { public static void main(String[] args) { Scanner scan=new Scanner(System.in); int even=0,odd=0; int N=scan.nextInt(); while(N-->0){ int i=scan.nextInt...
Main.java:8: error: class Addition is public, should be declared in a file named Addition.java public class Addition { ^ 1 error
s825171612
p03807
C++
#include<iostream> int main() { int n; std::cin >> n; std::cout << (n%2 ? "Yes" : "No") << endl; return 0; }
a.cc: In function 'int main()': a.cc:4:60: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 4 | int n; std::cin >> n; std::cout << (n%2 ? "Yes" : "No") << endl; | ^~~~ | ...