criyle/codenet-compile-errors huggingface dataset:
Language: 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) {

        if (odd > 1) {
            if (odd % 2 == 0) {
                even += odd / 2;
                odd = 0;
            }
            if (odd % 2 == 1) {
                odd--;
                even += odd / 2;
                odd = 1;
            }
        }
        if (odd == 0 || odd == 1) { break; }
    }

    while (1) {
        if (even > 1) {
            if (even % 2 == 0) {
                even = even / 2;
            }
            if (even % 2 == 1) {
                int a = (even - 1) / 2;
                even -= a;
            }
        }
        if (even =< 1 ) {
            break;
        }
    }
    int ans = even + odd;
    if (ans == 1) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:19: error: expected primary-expression before '<' token
   45 |         if (even =< 1 ) {
      |                   ^
Language: 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++;
        }
    }
    
    if (cnt % 2 == 0) {
        cout << "NO" << endl;

    } else cout << "YES" << endl;

    return 0;
}


Compiler output:
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#>, <#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:21: error: stray '#' in program
   10 |     HAIRETU(<#N#>, <#A#>);
      |                     ^
a.cc:2:49: note: in definition of macro 'HAIRETU'
    2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
      |                                                 ^
a.cc:10:23: error: stray '#' in program
   10 |     HAIRETU(<#N#>, <#A#>);
      |                       ^
a.cc:2:49: note: in definition of macro 'HAIRETU'
    2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
      |                                                 ^
a.cc: In function 'int main()':
a.cc:10:13: error: expected primary-expression before '<' token
   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:2:37: error: expected primary-expression before ';' token
    2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
      |                                     ^
a.cc:10:5: note: in expansion of macro 'HAIRETU'
   10 |     HAIRETU(<#N#>, <#A#>);
      |     ^~~~~~~
a.cc:10:20: error: expected primary-expression before '<' token
   10 |     HAIRETU(<#N#>, <#A#>);
      |                    ^
a.cc:2:49: note: in definition of macro 'HAIRETU'
    2 | #define HAIRETU(N,A) for(int i=0;i<N;i++) cin >>A[i]
      |                                                 ^
a.cc: In lambda function:
a.cc:10:26: error: expected '{' before ';' token
   10 |     HAIRETU(<#N#>, <#A#>);
      |                          ^
Language: 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;
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'N'
    6 |   cin N;
      |      ^~
      |      ;
Language: 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";
}
    
  
  

Compiler output:
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}
      |                                                ^
      |                                                ;
Language: 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<<d<<endl;
#define vecp(p) int aa;cin>>aa;(p).push_back(aa);
#define vecpl(p) long long aa;cin>>aa;(p).push_back(aa);
#define vecps(p) string aa;cin>>aa;(p).push_back(aa);
#define vecp2(p) cin>>aa;(p).push_back(aa);
#define vecpl2(p) long long a	b;cin>>ab;(p).push_back(ab);
#define vecps2(p) string ab;cin>>ab;(p).push_back(ab);
#define set0(k,n) for(int nn=0;nn<(n);nn++){ (k).push_back(0); }
#define sorts(c) sort((c).begin(),(c).end());
#define reverses(c) reverse((c).begin(),(c).end());
#define vec(b) vector<int> (b);
#define vecl(b) vector<long long> (b);
#define vecs(b) vector<string> (b);
#define vecsize(b,size) vector<int> (b)((size));
#define pb(b,a) (b).push_back((a));
#define doublece(a,b) cout<<(a)<<' '<<(b)<<endl;
#define pairs(s) vector<pair<int,int>> (s);
#define pairsl(s) vector<pair<ll,ll>> (s);
#define pairss(s) vector<pair<string,string>> (s);
#define pairsp(s) int aa,bb;cin>>aa>>bb;(s).push_back(make_pair(aa,bb));
#define pairspl(s) ll aa,bb;cin>>aa>>bb;(s).push_back(make_pair(aa,bb));
#define pairsps(s) string aa,bb;cin>>aa>>bb;(s).push_back(make_pair(aa,bb));
#define pairsREV(s) (s).push_back(make_pair(bb,aa));
#define pairslREV(s) (s).push_back(make_pair(bb,aa));
#define pairssREV(s) (s).push_back(make_pair(bb,aa));
#define MOD 1000000007

int main() {
	
	int N;
	cin>>N;
	int odd=0;
	fx(N){
		int a;
		cin>>a;
		if(a%2==1){
			a++;
		}
	}

if(a%2==0){
	ce("YES")
}else{
	ce("NO")
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:4: error: 'a' was not declared in this scope
   50 | if(a%2==0){
      |    ^
Language: 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 cout << "YES";
  return 0;
}

Compiler output:
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
Language: 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";
  
    
}

Compiler output:
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;
      |                             ^
Language: 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; 

}

Compiler output:
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];
      |            ^
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before 'return'
   10 |                 printf("NO")
      |                             ^
      |                             ;
   11 |                 return 0;
      |                 ~~~~~~
Language: 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(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mood 1000000007
//vector<vector<int> > dp;
//vector<vector<vector<int> > > vvvi;
//dp=vector<vector<int> >(N, vector<int>(M,0));
//vector<pair<int,int> > v;
//v.push_back(make_pair(x,y));

int main(){
cin.tie(0);
ios::sync_with_stdio(false);

	int N;
	cin>>N;
	ll cnt=0;
	REP(i,N){
		int a;
		cin>>a;
		if(a%2==1)cnt++;
	}
	if(a%2==1)cout<<"NO"<<endl;
	else cout<<"YES"<<endl;
	return 0;
}




















Compiler output:
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;
      |            ^
Language: 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(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mood 1000000007
//vector<vector<int> > dp;
//vector<vector<vector<int> > > vvvi;
//dp=vector<vector<int> >(N, vector<int>(M,0));
//vector<pair<int,int> > v;
//v.push_back(make_pair(x,y));

int main(){
cin.tie(0);
ios::sync_with_stdio(false);

	int N;
	cin>>N;
	REP(i,N){
		int a;
		cin>>a;
		if(a%2==1)cnt++;
	}
	if(a%2==1)cout<<"NO"<<endl;
	else cout<<"YES"<<endl;
	return 0;
}




















Compiler output:
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"<<endl;
      |            ^
Language: 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;
}


Compiler output:
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];
      |         ^~~
Language: 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;
}

Compiler output:
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:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:13: error: 'i' was not declared in this scope
    5 |         rep(i, n)cin >> a[i];
      |             ^
a.cc:5:9: error: 'rep' was not declared in this scope
    5 |         rep(i, n)cin >> a[i];
      |         ^~~
Language: 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;
}

Compiler output:
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 '...' before '&' token
    3 | scanf("%ld",&n);
      |             ^
main.c:4:1: error: expected identifier or '(' before 'while'
    4 | while(n-->0){
      | ^~~~~
main.c:8:1: error: expected identifier or '(' before 'if'
    8 | if(c%2==0)puts("YES");
      | ^~
main.c:9:1: error: expected identifier or '(' before 'else'
    9 | else if(n%2==1)puts("YES");
      | ^~~~
main.c:10:1: error: expected identifier or '(' before 'else'
   10 | else puts("NO");
      | ^~~~
main.c:11:1: error: expected identifier or '(' before 'return'
   11 | return 0;
      | ^~~~~~
main.c:12:1: error: expected identifier or '(' before '}' token
   12 | }
      | ^
Language: 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;}

Compiler output:
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/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: 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");}

Compiler output:
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_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: 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;
    cin >> N;
    int on = 0 REP(i, N)
    {
        cin >> A[i];
        if (A[i] % 2 == 1)
            on++;
    }
    if (on % 2 == 0)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
    return 0;
}

Compiler output:
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 expansion of macro 'REP'
   20 |     int on = 0 REP(i, N)
      |                ^~~
a.cc:20:20: error: 'i' was not declared in this scope
   20 |     int on = 0 REP(i, N)
      |                    ^
a.cc:7:41: note: in definition of macro 'FOR'
    7 | #define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i))
      |                                         ^
a.cc:20:16: note: in expansion of macro 'REP'
   20 |     int on = 0 REP(i, N)
      |                ^~~
Language: 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;
}


Compiler output:
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: error: 'a' was not declared in this scope
    8 |         cin >> a[i];
      |                ^
a.cc:9:9: error: 'sum' was not declared in this scope
    9 |         sum += a[i];
      |         ^~~
a.cc:11:9: error: 'sum' was not declared in this scope
   11 |     if (sum%2==0) cout << "YES" << endl;
      |         ^~~
Language: 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;
}


Compiler output:
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;
      |         ^~~
Language: 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;
}

Compiler output:
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;
      |           ^
Language: 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" << endl;
}


Compiler output:
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)
      |       ~~^~~
Language: 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" << endl;
}


Compiler output:
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++;)
      |                              ^
a.cc:11:29: error: expected ')' before ';' token
   11 |   for (int i = 0; i < N; i++;) {
      |       ~                     ^
      |                             )
a.cc:11:30: error: expected primary-expression before ')' token
   11 |   for (int i = 0; i < N; i++;) {
      |                              ^
a.cc:16:9: error: lvalue required as left operand of assignment
   16 |   if (x % 2 = 0)
      |       ~~^~~
Language: 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;
    string ans = "YES";
    vector<ll> b(n), c(n);
    for(ll i = 0; i < n; i++){
        cin >> a[i];
        sum += a[i];
    }
    if(a[i]%2 != 0) ans = "NO";
    cout << ans << endl;
}

Compiler output:
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";
      |          ^
Language: 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", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) 
      if (__gcd(a[i], a[j]) > 1) {
        g[i][j >> 6] |= (one << (j & 63));
        g[j][i >> 6] |= (one << (i & 63));
      }
    
  int nn = ((n - 1) >> 6) + 1;
  for (int i = 0; i < n; i++) {
    alive[i] = true;
    can_put[i] = true;
  }
  for (int it = 0; it < n; it++) 
    for (int i = 0; i < nn; i++) {
      was[i] = 0;
    }
    for (int i = 0; i < n; i++) 
      if (!alive[i]) 
        was[i >> 6] |= (one << (i & 63));
    
    int best = -1;
    for (int i = 0; i < n; i++) {
      if (was[i >> 6] & (one << (i & 63))) 
        continue;
  
      int b = 0, e = 1;
      x[0] = i;
      was[i >> 6] |= (one << (i & 63));
      while (b < e) {
        for (int j = 0; j < nn; j++) 
          if ((g[x[b]][j] & was[j]) != g[x[b]][j]) 
            for (int u = j * 64; u < (j + 1) * 64; u++) 
              if (g[x[b]][u >> 6] & (one << (u & 63))) 
                if (!(was[u >> 6] & (one << (u & 63)))) {
                  was[u >> 6] |= (one << (u & 63));
                  x[e++] = u;
                }
        b++;
      }
      int cur = -1;
      for (int j = 0; j < e; j++) {
        if (!can_put[x[j]]) 
          continue;
        
        if (cur == -1 || a[x[j]] < a[cur]) 
          cur = x[j];
      }
      if (best == -1 || (cur != -1 && a[cur] > a[best])) 
        best = cur;
      
    }
    if (it > 0) putchar(' ');
    printf("%d", a[best]);
    alive[best] = false;
    for (int i = 0; i < n; i++) {
      if (!alive[i])
        continue;
  
      if (g[best][i >> 6] & (one << (i & 63))) 
        can_put[i] = true;
      	else {
        if (a[best] < a[i]) 
          can_put[i] = false;
      }
    }
	}
  printf("\n");
  return 0;
}


Compiler output:
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
Language: 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;
	}
	return 0;
}

Compiler output:
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:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |                 cout << "YES" << 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:16:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |                 cout << "YES" << 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)
      |     ^~~~
a.cc:19:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |                 cout << "NO" << 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:19:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |                 cout << "NO" << endl;
      |                                 ^~~~
      |                                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: 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,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
    using namespace std;
 
    int main(){
      int n;
      cin >> n;
      int a[n];
      rep(i,n)cin >> a[i];
      int count++;
      rep(i,n){
       if(a[i]%2==1)count++; 
      }
      if(count%2==1)cout << "NO" << endl;
      else cout << "YES" << endl;
      return 0;}

Compiler output:
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 '<unresolved overloaded function type>' and 'int' to binary 'operator%'
   34 |       if(count%2==1)cout << "NO" << endl;
      |          ~~~~~^~
Language: 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;

Compiler output:
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(){
      |           ^
Language: 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<<"First\n";
        else
            cout<<"Second\n";
        /*if(n==3 || n==4 )
            cout<<"First\n";
        else if(n%3 || n%5)
            cout<<"Second\n";
        else
            cout<<"First\n";
    
    return 0;
}

Compiler output:
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 | {
      | ^
Language: 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;
}

Compiler output:
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++){
      |                  ^
      |                  ::
a.cc:7:17: error: 'N' is not a class, namespace, or enumeration
    7 |   for(int i=0;i<N:i++){
      |                 ^
a.cc:11:3: error: expected primary-expression before 'if'
   11 |   if(odd%2==1){cout << "NO" << endl;}
      |   ^~
a.cc:10:4: error: expected ';' before 'if'
   10 |   }
      |    ^
      |    ;
   11 |   if(odd%2==1){cout << "NO" << endl;}
      |   ~~
a.cc:11:3: error: expected primary-expression before 'if'
   11 |   if(odd%2==1){cout << "NO" << endl;}
      |   ^~
a.cc:10:4: error: expected ')' before 'if'
   10 |   }
      |    ^
      |    )
   11 |   if(odd%2==1){cout << "NO" << endl;}
      |   ~~
a.cc:7:6: note: to match this '('
    7 |   for(int i=0;i<N:i++){
      |      ^
Language: 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;
}

Compiler output:
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;
      |                        ~~~~~^~~~~~
Language: 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;
}


Compiler output:
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;
      |      ^~~
Language: 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 >> h;
    cnt += (h % 2);
  }
  cout << (h % 2 ? "NO" : "YES") << endl;
}


Compiler output:
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;
      |            ^
Language: 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(i,n) for(int i=1;i<=signed(n);i++)
#define ALL(a) (a).begin(),(a).end()
using std::cout;
using std::vector;
using std::endl;
using std::cin;
using std::string;
//#define EVEL 1
#ifdef EVEL
#define DEB(X) cout << #X << ":" <<X<<" " ;
#define TF(f) f ? cout<<"true  " : cout<<"false ";
#define END cout<<"\n";
#else
#define DEB(X) {}
#define TF(f) {}
#define END {}
#endif
constexpr int MOD = 1000000007;
constexpr ll INF = 50000000000000000;
typedef std::pair<int,int> P;
constexpr ll SIZE= 100010;

    ll N,A[100010],B[SIZE];
    ll ans=0,sum=0,wa=0;
int main() {
    std::ios_base::sync_with_stdio(false);
    cin>>N;
    REP(i,N){
        cin>>A[i];
        sum+=A[i];
        wa+=i+1;
    }
    REP(i,N){
        B[i]=A[(i+1)%N]-A[i];
    }
    bool f=true,g=true;
    if(sum%wa!=0)g=false;
    REP(i,N){
        B[i]-=sum/wa;
    }
    int cnt=0;
    REP(i,N){
        if(B[(i+1)%N]-B[i]==-N)cnt++;
        else if(B[(i+1)%N]-B[i]!=0&&B[(i+1)%N]-B[i]=!N)f=false;
    }
    if(cnt!=sum/wa)f=false;
    cout<<(f&&g?"YES":"NO")<<endl;
    return 0;
}


Compiler output:
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;
      |                 ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
Language: 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;
}

Compiler output:
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";
      |    ^~~
      |    int
Language: 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> 
#define pll pair<ll,ll> 

const int N = 30000; 
const int INF = int(2e9); 
const int MOD = int(1e9) + 7; 

string s; 

int main() 
{ 
freopen("debug.txt","w",stderr); 

int n,a[200100]; 
cin>> n; 
int cnt = 0; 
for(int i = 1;i <= n;i ++) { 
cin >>a[i]; 
if(a[i] % 2 == 1) { 
++ cnt; 
} 
} 
if(cnt % 2 == 0) { 
cout <<"YES"; 
} 
else { 
cout<< "NO"; 
} 
return 0; 
}
 

Ещё

Compiler output:
a.cc:49:1: error: '\U00000415\U00000449\U00000451' does not name a type
   49 | Ещё
      | ^~~
Language: 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_pair
#define pb push_back

#define pii pair<int,int>
#define pll pair<ll,ll>

const int N = 30000;
const int INF = int(2e9);
const int MOD = int(1e9) + 7;

string s;

int main()  
{
    freopen("debug.txt","w",stderr);

    int n,a[200100];
    cin >> n;
    int cnt = 0;
    for(int i = 1;i <= n;i ++) {
    	cin >> a[i];
    	if(a[i] % 2 == 1) {
    		++ cnt;
    	}
    }
    if(cnt % 2 == 0) {
    	cout << "YES";
    }
    else {
    	cout << "NO";
    }
	return 0;  
}  

Compiler output:
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< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: 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;
	}
}

Compiler output:
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){
      |            ~~~~~~^~~
Language: 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;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before 'cout'
   13 |     else (sum % 2 == 1) cout << "NO" << endl;
      |                        ^~~~~
      |                        ;
Language: 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"
}

Compiler output:
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"
      |     ~~~~
Language: 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<<"YES"<<endl : cout<<"NO"<<endl;
	return 0;
}

Compiler output:
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;
      |                            ^~~
      |                            abs
a.cc:13:22: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |                 else ans++;
      |                      ^~~
      |                      abs
a.cc:15:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |         while(ans>0){
      |               ^~~
      |               abs
Language: 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;
}

Compiler output:
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;
      |                      ~~~~~^~~~~~
Language: 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;
}

Compiler output:
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&(int, int)' (built-in)
   10 |   cout<<cnt&1?"No":"Yes"<<endl;
      |   ~~~~~~~~~^~
a.cc:10:12: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/cstddef:141:3: note: candidate: 'constexpr std::byte std::operator&(byte, byte)'
  141 |   operator&(byte __l, byte __r) noexcept
      |   ^~~~~~~~
/usr/include/c++/14/cstddef:141:18: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::byte'
  141 |   operator&(byte __l, byte __r) noexcept
      |             ~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:84:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator&(_Ios_Fmtflags, _Ios_Fmtflags)'
   84 |   operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:84:27: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Fmtflags'
   84 |   operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:134:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator&(_Ios_Openmode, _Ios_Openmode)'
  134 |   operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:134:27: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Openmode'
  134 |   operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:181:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator&(_Ios_Iostate, _Ios_Iostate)'
  181 |   operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:181:26: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Iostate'
  181 |   operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~^~~
a.cc:10:25: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |   cout<<cnt&1?"No":"Yes"<<endl;
      |                    ~~~~~^~~~~~
Language: 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;
}

Compiler output:
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 standard input
      |                  ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout<<cnt&1?"No":"Yes"<<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:9:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout<<cnt&1?"No":"Yes"<<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)
      |     ^~~~
Language: 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;
}


Compiler output:
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*
Language: 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=(int)(n);i<i##len;++i)
#define REP(i,n) REPF(i,0,n)
#define REPR(i,n) for(int i=(int)(n);i>=0;--i)
#define SZ(c) ((int)c.size())
#define CONTAIN(c,x) (c.find(x)!=end(c))
#define OUTOFRANGE(y,x,h,w) (y<0||x<0||y>=h||x>=w)
#define dump(...)
#ifdef int
    #define INF 1001001001001001001LL
    #define stoi stoll
#else
    #define INF 1001001001

signed main() {
    int n=IN;
    int cnt=0;
    REP(i,n) {
        int a=IN;
        cnt+=a%2;
    }
    cout<<(cnt%2==0?"YES":"NO")<<endl;
    return 0;
}


Compiler output:
a.cc:18: error: unterminated #else
   18 | #ifdef int
Language: 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;
}

Compiler output:
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;
      |                ^
a.cc:16:16: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:15:21: error: '\U0000201cNO\U0000201d' was not declared in this scope
   15 |   if(cnt%2) cout << “NO” << endl;
      |                     ^~~~
a.cc:16:16: error: '\U0000201cYES\U0000201d' was not declared in this scope
   16 |   else cout << “YES” << endl;
      |                ^~~~~
Language: 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;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before ':' token
    9 |     cin >> a:
      |             ^
      |             ;
Language: 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')


Compiler output:
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' if (cnt % 2 == 0) else 'NO')
      |                                    ^~~~
a.cc:3:1: error: 'N' does not name a type
    3 | N = int(input())
      | ^
Language: 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;
	}
}

Compiler output:
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
Language: 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;
	}
}

Compiler output:
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){
      |            ^~~~~~~~~~