criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <stdio.h>
#include <stdlib.h>

int a[100000];

int Cmp(const void *a, const void *b){
  return *(int *)a - *(int *)b;
}

int Check(int N){
  int i, c;
  int cn[3], n[3];
  for(i = 0;i < 3;i++) cn[i] = 0;
  c = cn[0] = 1;
  n[0] = a[0];
  for(i = 1;i < N;i++){
    if(a[i-1] == a[i]) cn[c-1]++;
    else{
      c++;
      if(c == 4) return 0;
      n[c-1] = a[i];
      cn[c-1]++;
    }
  }
  if(c == 1) return 0;
  if(c == 2){
    if(n[0] != 0) return 0;
    else{
      n[1]++;
      while(n[1] != 1){
	if(n[1] % 2 != 0) return 0;
	else n[1] *= 0.5;
      }
      if(c[1] - c[0] == 0) return 1;
      else return 0;
    }  
  }
  if(N % 3 != 0) return 0;
  for(i = 0;i < 3;i++) if(cn[i] != N / 3) return 0;
  if(n[0] != (n[1] ^ n[2])) return 0;
  else return 1;
}

void Do(int N){
  int i;
  for(i = 0;i < N;i++) scanf("%d", &a[i]);
  qsort(a, N, sizeof(int), Cmp);
  if(Check(N) == 1) printf("Yes\n");
  else printf("No\n");
}

int main(void){
  int N;
  scanf("%d", &N);
  Do(N);
  return 0;
}


Compiler output:
main.c: In function 'Check':
main.c:34:11: error: subscripted value is neither array nor pointer nor vector
   34 |       if(c[1] - c[0] == 0) return 1;
      |           ^
main.c:34:18: error: subscripted value is neither array nor pointer nor vector
   34 |       if(c[1] - c[0] == 0) return 1;
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

string checker(vector<int> a,int N){
string ret="Yes";
int s1,s2,i;
  for(i=0;i<N;i++){
    if(i==0){
      s1=a.at(i);
      s2=a.at(i+1)^a.at(N-1);
    }else if(i==N-1){
      s1=a.at(i);
      s2=a.at(0)^a.at(i-1);
    }else{
    s1=a.at(i);
    s2=a.at(i+1)^a.at(i-1);
  }
    if(s1!=s2){
      ret="No";
      break;
    }
  }
return ret;

}

int main() {
  int N,i,j;
  cin>>N;
  vector<int> a(N);
  vector<int> index(N);
  for(i=0;i<N;i++){
    cin>>a.at(i);
    index.at(i)=i;
  }

string ret;
  ret=checker(vector<int> a,int N)
cout<<ret<<endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:27: error: expected primary-expression before 'a'
   38 |   ret=checker(vector<int> a,int N)
      |                           ^
a.cc:38:29: error: expected primary-expression before 'int'
   38 |   ret=checker(vector<int> a,int N)
      |                             ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
#include <iomanip>
using namespace std;

typedef long long ll;
typedef long double ld;

ll XOR(ll a,ll b){
    ll ans=0;
    for (ll x=2;x<=a*2 || x<=b*2;x*=2){
        ll A=a%x,B=b%x;
        if (A==B){
            continue;
        }else if(A<B){
            ll z=x/2;
            ans+=z;
            b-=z;
        }else{
            ll z=x/2;
            ans+=z;
            a-=z;
        }
    }
    return ans;
}

bool find(ll n,ll x,ll a[n+10],ll b[x+10]){
    for (ll i=0;i<n;++i){
        for (ll j=0;j<x;++j){
            if (a[i]==b[j]){
                b[j]=-1;
                break;
            }else if(j==x-1){
                return false;
            }
        }
    }
    return true;
}
int main(){
    ll n,x=1,c=0;
    cin >> n;
    for (ll i=n;1<i;--i){
        x*=i;
    }
    ll a[n+10],b[x+10];
    for (ll i=0;i<n;++i){
        cin >> a[i];
    }
    for (ll i=0;i<n;++i){
        for (ll j=i+1;j<n;++j){
            b[c]=XOR(a[i],a[j]);
            ++c;
        }
    }
    if(find(n,x,a,b)){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    return 0;
}


Compiler output:
a.cc:31:27: error: use of parameter outside function body before '+' token
   31 | bool find(ll n,ll x,ll a[n+10],ll b[x+10]){
      |                           ^
a.cc:31:31: error: expected ')' before ',' token
   31 | bool find(ll n,ll x,ll a[n+10],ll b[x+10]){
      |          ~                    ^
      |                               )
a.cc:31:35: error: expected initializer before 'b'
   31 | bool find(ll n,ll x,ll a[n+10],ll b[x+10]){
      |                                   ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define ll long long
using namespace std;

ll binary(ll bina){
    ll ans = 0;
    for (int i = 0; bina>0 ; i++)
    {
        ans = ans+(bina%2)*pow(10,i);
        bina = bina/2;
    }
    return ans;
}


int main() {
    int N; cin >> N; map<ll,ll> m;
    int b[10];
    rep(i,N){
        ll a; cin >> a;
        m[a]++;
    }
    if(N%3 != 0){
        if(map[0] != 0){
            cout << "No" << endl;
            return 0;
        }
    }
     if(m.size() >= 3 || m.size() == 1){
         cout << "No" << endl;
         return 0;
     }

     else{
         if(m.size() == 3){
             for(auto p : m){
                 if(p.second%(N/3) != 0)
                 {cout << "No" << endl;
                 return 0;} 
                 b.pushback(p.first); 
              }
              if(b[0]^b[1] == b[2] && b[1]^b[2] == b[0]
              && b[2]^b[0] == b[1])
              cout << "Yes" << endl;
              else cout << "No" << endl;
         }
         else if(m.size() == 2){
             for(auto p : m){
                 if(p.second%(N/3) != 0)
                 {
                     cout << "No" << endl;
                     return 0;
                 }
                 b.pushback(p.first);}
                 if(b[0]^b[1] == b[0])
                 cout << "Yes" << endl;
                 else cout << "No" << endl;

             }

             
         }

     }

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: expected unqualified-id before '[' token
   25 |         if(map[0] != 0){
      |               ^
a.cc:41:20: error: request for member 'pushback' in 'b', which is of non-class type 'int [10]'
   41 |                  b.pushback(p.first);
      |                    ^~~~~~~~
a.cc:55:20: error: request for member 'pushback' in 'b', which is of non-class type 'int [10]'
   55 |                  b.pushback(p.first);}
      |                    ^~~~~~~~
a.cc: At global scope:
a.cc:67:5: error: expected unqualified-id before 'return'
   67 |     return 0;
      |     ^~~~~~
a.cc:68:1: error: expected declaration before '}' token
   68 | }
      | ^
Language: C++

#include "bits/stdc++.h"
using namespace std;

const int MAXN = 1e5 + 5;

int n, a[MAXN];
map<int, int> num;
vector<int> vals;

int main(){
	scanf("%d", &n);
	bool doZero = false;
	for(int i = 0; i< n; ++i){
		scanf("%d", &a[i]);
		num[a[i]]++;
		if(a[i] == 0)
			doZero = true;
	}
	if(n%3 == 0){
		// Must make pattern of 3
		if(num.size() > 3){
			printf("No\n");
		}else if(num.size() == 3){
			bool valid = true;
			int val = -1;
			for(auto i = num.begin(); i != num.end(); i++){
				if(val != -1 && (i->second) != val)
					valid = false;
				val = (i->second);
				vals.push_back(i->first);
			}
			//if((vals[0]^vals[2] != vals[1]))
			//	valid = false;
			if(valid){}
				assert(false);
				printf("Yes\n");
			}else{
				//assert(false);
				printf("No\n");
			}
		}else if(num.size() == 2){
			bool valid = true, hasZero = false;
			int val = -1;
			for(auto i = num.begin(); i != num.end(); i++){
				if(i->first == 0){
					hasZero = true;
					if(val != -1 && 2*(i->second) != val)
						valid = false;
				}else{
					if(val != -1 && (i->second) != 2*val)
						valid = false;
				}
				val = i->second;
			}
			if(valid)
				printf("Yes\n");
			else
				printf("No\n");
		}else if(num.size() == 1){
			if(doZero)
				printf("Yes\n");
			else
				printf("No\n");
		}else{
			assert(false);
		}
	}else{
		if(num.size() == 1 && doZero){
			printf("Yes\n");
		}else{
			printf("No\n");
		}
	}
}

Compiler output:
a.cc:67:10: error: expected unqualified-id before 'else'
   67 |         }else{
      |          ^~~~
a.cc:74:1: error: expected declaration before '}' token
   74 | }
      | ^
Language: C++

#include "bits/stdc++.h"
using namespace std;

const int MAXN = 1e5 + 5;

int n, a[MAXN];
map<int, int> num;
vector<int> vals;

int main(){
	scanf("%d", &n);
	bool doZero = false;
	for(int i = 0; i< n; ++i){
		scanf("%d", &a[i]);
		num[a[i]]++;
		if(a[i] == 0)
			doZero = true;
	}
	if(n%3 == 0){
		// Must make pattern of 3
		if(num.size() > 3){
			printf("No\n");
		}else if(num.size() == 3){
			bool valid = true;
			int val = -1;
			for(auto i = num.begin(); i != num.end(); i++){
				if(val != -1 && (i->second) != val)
					valid = false;
				val = (i->second);
				vals.push_back(i->first);
			}
			//if((vals[0]^vals[2] != vals[1]))
			//	valid = false;
			if(valid)
				assert(false);
				printf("Yes\n");
			else{
				//assert(false);
				printf("No\n");
			}
		}else if(num.size() == 2){
			bool valid = true, hasZero = false;
			int val = -1;
			for(auto i = num.begin(); i != num.end(); i++){
				if(i->first == 0){
					hasZero = true;
					if(val != -1 && 2*(i->second) != val)
						valid = false;
				}else{
					if(val != -1 && (i->second) != 2*val)
						valid = false;
				}
				val = i->second;
			}
			if(valid)
				printf("Yes\n");
			else
				printf("No\n");
		}else if(num.size() == 1){
			if(doZero)
				printf("Yes\n");
			else
				printf("No\n");
		}else{
			assert(false);
		}
	}else{
		if(num.size() == 1 && doZero){
			printf("Yes\n");
		}else{
			printf("No\n");
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: expected '}' before 'else'
   37 |                         else{
      |                         ^~~~
a.cc:23:42: note: to match this '{'
   23 |                 }else if(num.size() == 3){
      |                                          ^
a.cc: At global scope:
a.cc:67:10: error: expected unqualified-id before 'else'
   67 |         }else{
      |          ^~~~
a.cc:74:1: error: expected declaration before '}' token
   74 | }
      | ^
Language: C++

#include <iostream>

using namespace std;
int main(int argc, char *argv[]) {
	int n;
	cin >> n;
	int a[n];
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	
	int ans = a[0];
	for (int i = 1; i < n; i++) {
		ans = ans ^ a[i]
	}
	
	cout << (ans == 0 ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:14:33: error: expected ';' before '}' token
   14 |                 ans = ans ^ a[i]
      |                                 ^
      |                                 ;
   15 |         }
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#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--)
typedef long long LL;
int N;
LL a[100001];
LL b[100001];
LL c[100001];
LL ch[100001];
int main(){
	cin>>N;

	map<LL,int>m;
	
	REP(i,N){
		cin>>a[i];
		m[a[i]]++;
	}
	int cc=0;
	for(auto it:m){
		b[cc]=it.first;
		c[cc]=it.second;
		cc++;
	}
	if(c>4){
		cout<<"No"<<endl;
	}else{
		REP(i,cc){
			REP(j,cc){
				REP(k,cc){
					ch[k]=c[k];
				}
				LL now=b[i];
				LL now2=b[j];
				ch[i]--;
				ch[j]--;
				REP(k,N-2){
					LL nxt=now^now2;
					ch[nxt]--;
					now=now2;
					now2=nxt;
				}
				bool c=false;
				REP(k,cc){
					if(ch[k]!=0)c=true;
				}
				if(c==false){
					cout<<"Yes"<<endl;
					return 0;
				}
			}
		}
		cout<<"No"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |         if(c>4){
      |            ~^~
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <queue>
#include <map>
#include <list>
//#include <bits/stdc++.h>


using namespace std;

#define FOR(i,a,b) for(int i=(a),i##formax=(b);i<i##formax;i++)
typedef long long ll;

int main(){
    ll n;
    
    cin >> n;
    vector<ll> a(n);


    if (n%3 != 0){cout << "No" << endl;}
    else{
        
        for(ll i=0;i<n;i++){
            cin >> a[i];
        }
        sort(a.begin(),a.end());
        a.erase( unique(a.begin(), a.end()), a.end() );
        
        if(a.size()>3){cout << "No" << endl;}
        else if(a.size()==2){
            if(a[0]==0){cout << "Yes" << endl;}
            else{cout << "No" << endl;}
        }
        else if((a.size()==1){
            if(a[0]==0){cout << "Yes" << endl;}
            else{cout << "No" << endl;}
        })
        else{
            if(a[0]+a[1]==a[2]){cout << "Yes" << endl;}
            else{cout << "No" << endl;}
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:30: error: expected ')' before '{' token
   36 |         else if((a.size()==1){
      |                ~             ^
      |                              )
a.cc:40:9: error: expected primary-expression before 'else'
   40 |         else{
      |         ^~~~
Language: C++

#include<stdio.h>
#include <stdlib.h>
#define NUM 100000


int main() {
	int n,i;
	int a[NUM];
	int count = 1;
	int tmp;


	scanf("%d",&n);

	if (n < 3)
		exit(0);

	for (i = 0; i < n; i++) {
		scanf("%d", &a[i]);
	}

	for (i = 0; i<n; ++i) {
		for (j = i + 1; j<n; ++j) {
			if (a[i] > a[j]) {
				tmp = a[i];
				a[i] = a[j];
				a[j] = tmp;
			}
		}
	}

	
	for (i = 0; i < n; i++) {
		if(i == 0) {
			if ((a[1] ^ a[n - 1]) != a[0]) {
				count = 0;
			}
		}
		else if (i == (n - 1)) {
			if ((a[0] ^ a[n - 2]) != a[n - 1]) {
				count = 0;
			}
		}

		else {
			if ((a[i - 1] ^ a[i + 1]) != a[i]) {
				count = 0;
			}

		}


	}

		if (count == 1)
			printf("Yes\n");
		if (count == 0)
			printf("No\n");

		return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:22: error: 'j' was not declared in this scope
   23 |                 for (j = i + 1; j<n; ++j) {
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
  {
  int n; cin>>n; int p; map<int,int> mp;
  for(int i=0;i<n;i++) {cin>>p; mp[p]++;}
  for(auto x:mp) {vec.push_back(x.first); sec.push_back(x.second);}
  if (n%3==0) {
    if (vec.size()==3){ 
          if (vec[0]^vec[1]==vec[2] && sec[0]==sec[1] && sec[1]==sec[2])
            cout<<"Yes";
      else cout<<"No";
      }
      else if (vec.size()==2) {
         if(vec[0]==0 && sec[1]==2*sec[0]) cout<<"Yes"; else cout<<"No";
        }
        else if (vec.size()==1) {
          if(vec[0]==0) cout<<"Yes"; else cout<<"No";
          }
          else cout<<"No";
  }
  else {
     if(vec[0]==0) cout<<"Yes"; else cout<<"No";
  }
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: 'vec' was not declared in this scope
    7 |   for(auto x:mp) {vec.push_back(x.first); sec.push_back(x.second);}
      |                   ^~~
a.cc:7:43: error: 'sec' was not declared in this scope
    7 |   for(auto x:mp) {vec.push_back(x.first); sec.push_back(x.second);}
      |                                           ^~~
a.cc:9:9: error: 'vec' was not declared in this scope
    9 |     if (vec.size()==3){
      |         ^~~
a.cc:10:40: error: 'sec' was not declared in this scope
   10 |           if (vec[0]^vec[1]==vec[2] && sec[0]==sec[1] && sec[1]==sec[2])
      |                                        ^~~
a.cc:15:26: error: 'sec' was not declared in this scope
   15 |          if(vec[0]==0 && sec[1]==2*sec[0]) cout<<"Yes"; else cout<<"No";
      |                          ^~~
a.cc:23:9: error: 'vec' was not declared in this scope
   23 |      if(vec[0]==0) cout<<"Yes"; else cout<<"No";
      |         ^~~
Language: C++

#include <algorithm>
#include <bitset>
//#include <boost/multiprecision/cpp_int.hpp>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <sstream>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
//namespace mp = boost::multiprecision;
using namespace std;
using ull = unsigned long long;
using ld = long double;
// using ll = boost::multiprecision::cpp_int;
using ll = long long;
#define FORi(N) for(ll i = 0; i < N; ++i)
#define FORj(N) for(ll j = 0; j < N; ++j)
#define FORk(N) for(ll k = 0; k < N; ++k)

#define ALL(v) v.begin(),v.end()
// using int = ll;
ll gcd(ll m, ll n) {
    if(n == 0)
        return abs(m);
    return (gcd(n, m % n));
}
void putYN(bool b) {
    if(b) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}
void swap(ll &a, ll &b) {
    ll tmp = a;
    a = b;
    b = tmp;
}
ll combi(ll n, ll k) {
    ll r = 1, rr = 1;
    for(ll i = 0; i < k; ++i) {
        r *= (n - i);
        rr *= (i + 1);
        // r %= 1000000007;
        // rr %= 1000000007;
    }
    r /= rr;
    // r %= 1000000007;
    return r;
}

int main() {
    ll N;
    cin >> N;
    map<ll,ll> a;
    bool flag = true;
    FORi(N) {
        ll tmp;
        cin >> tmp;
        if(a.find(tmp)==a.end()){
            a[tmp] = 1;
        }else{
            a[tmp]++;
        }
        if(a.size()>3){
            flag = false;
            break;
        }
    }
    if(flag){
        if(a.size()==3){
            auto i0 = a.begin();
            auto i1 = i0;
            auto i2 = i0;
            i1++;
            i2++;
            i2++;
            //cout << i0->first;
            //cout << i1->first;
            //cout << i2->first;
            if((ll)(i1->first^i2->first)!=i0->first){
                //cout << (ll)(i1->first^i2->first);
                flag = false;
            }
            if((i0->second == i1->second && i1->second==i2->second)){}
                
            }else{
                flag = false;
            }
        }else if(a.size()==2){
            auto i0 = a.begin();
            auto i1 = i0;
            i1++;
            if(i0->first==0||i1->first==0){

            }else{
                flag = false;
            }
            if(i0->second!=i1->second){
                flag = false;
            }
        }else{
            if(a.begin()->first!=0){
                flag = false;
            }
        }
    }
    if(!flag){

    }
    putYN(flag);

    return 0;
}

Compiler output:
a.cc:115:5: error: expected unqualified-id before 'if'
  115 |     if(!flag){
      |     ^~
a.cc:118:10: error: expected constructor, destructor, or type conversion before '(' token
  118 |     putYN(flag);
      |          ^
a.cc:120:5: error: expected unqualified-id before 'return'
  120 |     return 0;
      |     ^~~~~~
a.cc:121:1: error: expected declaration before '}' token
  121 | }
      | ^
Language: C++

import copy
import numpy
import sys

N = int(input())
List = list(map(int,input().split()))

count=0

for i in range(N-1):
    first = List[i]
    a = copy.deepcopy(List)
    
    for j in range(i+1,N-1):
#        print("j:{}".format(j))
        acopy = copy.deepcopy(List)
        second = a[j]
        acopy.remove(second)
        
        for k in (i+j+1,N-1):
                   
#            print("{} {}".format(first,second))

            xor = bin(first ^ second)
            check = int(xor,2)
#            print("{} {}".format(xor,check))

            if (check in acopy):
#                print("k:{}".format(k))
                first = a[k]
                second = check
                acopy.remove(second)

#                print("Yes")
            else:
#                print("no")
                continue

            if (k == (N-1)):
                count = 1
                break
    
        if(count == 1):
            print("Yes")
            sys.exit()

print("No")


Compiler output:
a.cc:15:10: error: invalid preprocessing directive #print
   15 | #        print("j:{}".format(j))
      |          ^~~~~
a.cc:22:14: error: invalid preprocessing directive #print
   22 | #            print("{} {}".format(first,second))
      |              ^~~~~
a.cc:26:14: error: invalid preprocessing directive #print
   26 | #            print("{} {}".format(xor,check))
      |              ^~~~~
a.cc:29:18: error: invalid preprocessing directive #print
   29 | #                print("k:{}".format(k))
      |                  ^~~~~
a.cc:34:18: error: invalid preprocessing directive #print
   34 | #                print("Yes")
      |                  ^~~~~
a.cc:36:18: error: invalid preprocessing directive #print
   36 | #                print("no")
      |                  ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import copy
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C

#include <iostream>
#include <map>
#include <vector>
using namespace std;

using ll = long long;

int main() {
	ll n;
	cin >> n;

	map<ll,ll> m;
	ll cur;

	for (ll i = 0; i < n; i++) {
		cin >> cur;
		m[cur]++;
	}
	ll s = m.size();
	if (s > 3 || s == 0) {
		cout << "No" << endl;
		return 0;
	}

	if (s == 1) {
		if (cur == 0) {
			cout << "Yes" << endl;			
		} else {
			cout << "No" << endl;						
		}
		return 0;
	}

	vector<ll> v;
	if (s == 2) {
		if (n % 3 != 0) {
			cout << "No" << endl;			
		}
		for (auto value : m) {
			if (value.second == (n / 3) * 2) {
				v.push_back(value.first);
				v.push_back(value.first);
				continue;
			}
			if (value.second == n / 3) {
				v.push_back(value.first);
				continue;
			}
			cout << "No" << endl;
			return 0;
		}
	}
	if (s == 3) {
		for (auto value : m) {
			if (value.second != n / 3) {
				cout << "No" << endl;
				return 0;
			}
			v.push_back(value.first);
		}
	}
	if ((v[0] ^ v[2]) != v[1]) {
		cout << "No" << endl;	
		return 0;
	}
	if ((v[1] ^ v[0]) != v[2]) {
		cout << "No" << endl;
		return 0;	
	}
	if ((v[1] ^ v[2]) != v[0]) {
		cout << "No" << endl;
		return 0;	
	}
	cout << "Yes" << endl;	

	return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(void){
    int hat_sum;
    
    
    int j = 0;
    
    int k;


    scanf("%d",&hat_sum);
    int binaly[hat_sum];
	int hat_number[hat_sum];
    // convert intager to binary
    int i = 0;
    scanf("%d",&hat_number[0] * hat_sum, ...);
    do {
        int base = 1;
        binaly[i] = 0;
        k = hat_number;
        do {
        binaly[i] = binaly[i] + ( k % 2) * base;
        k = k / 2;
        base *= 10;
        } while ( k > 0);
        i++;
    } while ( i < hat_sum);
    
    i = 0;
    
    do {
        printf("%d\n", binaly[i] ^ binaly[i+2]);
        if (binaly[i+1] == (binaly[i] ^ binaly[i+2])){
            j++;
            i++;
        } else {
            break;
        }
    } while (i < hat_sum - 2);

    if (j == hat_sum - 2){
        printf("Yes\n");
    } else {
        printf("No\n");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:31: error: invalid operands to binary * (have 'int *' and 'int')
   16 |     scanf("%d",&hat_number[0] * hat_sum, ...);
      |                ~~~~~~~~~~~~~~ ^
      |                |
      |                int *
main.c:16:42: error: expected expression before '...' token
   16 |     scanf("%d",&hat_number[0] * hat_sum, ...);
      |                                          ^~~
main.c:20:11: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   20 |         k = hat_number;
      |           ^
Language: C++

#include <iostream>
#include <list>
#include <stdio.h>
//#include <bits/stdc++.h>
using namespace std;

int main()
{
  int n = 0;
  cin >> n;
  int a[100000];
  int b[100000];
  int cnt = 0
  for(int i = 0; i < n ; i++ )
  {
    cin >> a[i];
    
  }
  b[0] = a[0];
  for(int i = 1; i<n;i++)
  {
    b[1] = a[i];
    /*lst.erase(next(lst.begin(),i));
    for(auto itr = lst.begin();itr != lst.end();)
    {
      if((a[(n -cnt)%n] ^ *itr) == a[(n -cnt)%n + 1])
      {
         a[(n -cnt)%n + 2] = *itr;
         break;
      }
      cnt ++;
    }*/
    for(int j = n; j>i;j--)
    {
      if((b[(n -i)%n] ^ a[j]) ==b[(n -i + 1)%n] )
      {
        b[((n - i + 2) % n ] = a[j];
      }
    }
  }
//  cout << max << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected ',' or ';' before 'for'
   14 |   for(int i = 0; i < n ; i++ )
      |   ^~~
a.cc:14:18: error: 'i' was not declared in this scope
   14 |   for(int i = 0; i < n ; i++ )
      |                  ^
a.cc:37:27: error: expected ')' before ']' token
   37 |         b[((n - i + 2) % n ] = a[j];
      |           ~               ^~
      |                           )
a.cc:37:36: error: expected ']' before ';' token
   37 |         b[((n - i + 2) % n ] = a[j];
      |                                    ^
      |                                    ]
Language: C++

int main() {
	int N;
	cin >> N;
	int a[100000];
	for (int i = 0; i < N; i++) cin >> a[i];
	
	int i=1;
	int temp=0;

	for (i; i < N-1; i++) {
		if (a[i] == (a[i - 1] ^ a[i + 1])) {
			temp++;
			continue;
		}
	}
	if (a[0] == (a[N - 1] ^ a[1])) {
		temp++;
	}
	if (a[N-1] == (a[0] ^ a[N-2])) {
		temp++;
	}

	
	if (temp == N) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> N;
      |         ^~~
a.cc:25:17: error: 'cout' was not declared in this scope
   25 |                 cout << "Yes" << endl;
      |                 ^~~~
a.cc:25:34: error: 'endl' was not declared in this scope
   25 |                 cout << "Yes" << endl;
      |                                  ^~~~
a.cc:28:17: error: 'cout' was not declared in this scope
   28 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:28:33: error: 'endl' was not declared in this scope
   28 |                 cout << "No" << endl;
      |                                 ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  cin >> n;
  vector<unsingedint> data(n);
  for(int i=0;i<n;++i)cin >> data[i];
  bool flag = true;
  for(int i=0;i<n;++i){
    unsingedint a = 0;
    if(i==0)a = data[n-1];
    else a = data[i-1];
    unsingedint b = 0;
    if(i==n-1)b = data[0];
    else b = data[i+1];
    if((a^b)!=data[i]){
      flag = false;
    }
  }
  if(flag)cout << "Yes";
  else cout << "No";
  cout << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'unsingedint' was not declared in this scope; did you mean 'unsigned'?
    6 |   vector<unsingedint> data(n);
      |          ^~~~~~~~~~~
      |          unsigned
a.cc:6:21: error: template argument 1 is invalid
    6 |   vector<unsingedint> data(n);
      |                     ^
a.cc:6:21: error: template argument 2 is invalid
a.cc:7:34: error: invalid types 'int[int]' for array subscript
    7 |   for(int i=0;i<n;++i)cin >> data[i];
      |                                  ^
a.cc:10:16: error: expected ';' before 'a'
   10 |     unsingedint a = 0;
      |                ^~
      |                ;
a.cc:11:13: error: 'a' was not declared in this scope
   11 |     if(i==0)a = data[n-1];
      |             ^
a.cc:11:21: error: invalid types 'int[int]' for array subscript
   11 |     if(i==0)a = data[n-1];
      |                     ^
a.cc:12:10: error: 'a' was not declared in this scope
   12 |     else a = data[i-1];
      |          ^
a.cc:12:18: error: invalid types 'int[int]' for array subscript
   12 |     else a = data[i-1];
      |                  ^
a.cc:13:16: error: expected ';' before 'b'
   13 |     unsingedint b = 0;
      |                ^~
      |                ;
a.cc:14:15: error: 'b' was not declared in this scope
   14 |     if(i==n-1)b = data[0];
      |               ^
a.cc:14:23: error: invalid types 'int[int]' for array subscript
   14 |     if(i==n-1)b = data[0];
      |                       ^
a.cc:15:10: error: 'b' was not declared in this scope
   15 |     else b = data[i+1];
      |          ^
a.cc:15:18: error: invalid types 'int[int]' for array subscript
   15 |     else b = data[i+1];
      |                  ^
a.cc:16:9: error: 'a' was not declared in this scope
   16 |     if((a^b)!=data[i]){
      |         ^
a.cc:16:11: error: 'b' was not declared in this scope
   16 |     if((a^b)!=data[i]){
      |           ^
a.cc:16:19: error: invalid types 'int[int]' for array subscript
   16 |     if((a^b)!=data[i]){
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  cin >> n;
  vector<unsinged int> data(n);
  for(int i=0;i<n;++i)cin >> data[i];
  bool flag = true;
  for(int i=0;i<n;++i){
    unsinged int a = 0;
    if(i==0)a = data[n-1];
    else a = data[i-1];
    unsinged int b = 0;
    if(i==n-1)b = data[0];
    else b = data[i+1];
    if((a^b)!=data[i]){
      flag = false;
    }
  }
  if(flag)cout << "Yes";
  else cout << "No";
  cout << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'unsinged' was not declared in this scope; did you mean 'unsigned'?
    6 |   vector<unsinged int> data(n);
      |          ^~~~~~~~
      |          unsigned
a.cc:6:22: error: template argument 1 is invalid
    6 |   vector<unsinged int> data(n);
      |                      ^
a.cc:6:22: error: template argument 2 is invalid
a.cc:7:34: error: invalid types 'int[int]' for array subscript
    7 |   for(int i=0;i<n;++i)cin >> data[i];
      |                                  ^
a.cc:10:13: error: expected ';' before 'int'
   10 |     unsinged int a = 0;
      |             ^~~~
      |             ;
a.cc:11:13: error: 'a' was not declared in this scope
   11 |     if(i==0)a = data[n-1];
      |             ^
a.cc:11:21: error: invalid types 'int[int]' for array subscript
   11 |     if(i==0)a = data[n-1];
      |                     ^
a.cc:12:10: error: 'a' was not declared in this scope
   12 |     else a = data[i-1];
      |          ^
a.cc:12:18: error: invalid types 'int[int]' for array subscript
   12 |     else a = data[i-1];
      |                  ^
a.cc:13:13: error: expected ';' before 'int'
   13 |     unsinged int b = 0;
      |             ^~~~
      |             ;
a.cc:14:15: error: 'b' was not declared in this scope
   14 |     if(i==n-1)b = data[0];
      |               ^
a.cc:14:23: error: invalid types 'int[int]' for array subscript
   14 |     if(i==n-1)b = data[0];
      |                       ^
a.cc:15:10: error: 'b' was not declared in this scope
   15 |     else b = data[i+1];
      |          ^
a.cc:15:18: error: invalid types 'int[int]' for array subscript
   15 |     else b = data[i+1];
      |                  ^
a.cc:16:9: error: 'a' was not declared in this scope
   16 |     if((a^b)!=data[i]){
      |         ^
a.cc:16:11: error: 'b' was not declared in this scope
   16 |     if((a^b)!=data[i]){
      |           ^
a.cc:16:19: error: invalid types 'int[int]' for array subscript
   16 |     if((a^b)!=data[i]){
      |                   ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <cmath>
#include <utility>
using namespace std;

int ten_to_two(int n){
  int bi=0;
  int base=1;
  
  while(n>0){
    bi+=(n%2)*base;
    n/=2;
    base*=10;
  }
  
  return bi;
}

int two_to_ten(int n){
  int decimal=0;
  int base=1;
  
  while(n>0){
    decimal+=(n%10)*base;
    n/=10;
    base*=2;
  }
  
  return decimal;
}

int haita(int n){
  string s=to_string(n);
  for(int i=0;i<s.size();++i){
    if(s[i]%2==0)
      s[i]='0';
  }
  
  int x=stoi(s);
  return x;
}

int main() {
  int N;
  cin>>N;
  
  vector<int> a(N);
  for(int i=0;i<N;++i){
    cin>>a[i];
  }
  
  bool is_good=true;
  
  for(int i=1;i<N-1;++i){
    int x=ten_to_two(a[i-1])+ten_to_two(a[i+1]);
    int y=haita(x);
    int z=two_to_ten(y);
    if(a[i]!=z){
      is_good=false;
      break;
    }
  }
  
  int x=ten_to_two(a[N-1])+ten_to_two(a[1]);
  int y=haita(x);
  int z=two_to_ten(y);
  if(a[i]!=z)
    is_good=false;
  
  x=ten_to_two(a[N-2])+ten_to_two(a[0]);
  y=haita(x);
  z=two_to_ten(y);
  if(a[i]!=z)
    is_good=false;
  
  if(is_good)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:71:8: error: 'i' was not declared in this scope
   71 |   if(a[i]!=z)
      |        ^
a.cc:77:8: error: 'i' was not declared in this scope
   77 |   if(a[i]!=z)
      |        ^
Language: C++

#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define inf 1e+9
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }

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

    ll n,sum=0,sum1=0,sum2=0,ans=0;
	cin >> n;
	ll a[n];
	rep(i,n){
		cin >> a[i];
		sum += a[i];
		int b=a[0];
		if(a[i]==0){
			ans++;
		}
		// if(a[i]%2==0){
		// 	sum1+=a[i];
		// }
		// else{ 
		// 	sum2+=a[i];
		// }
	}

	if(sum%2==0 && sum%n==0 || sum/n==2{
		cout << "Yes" << endl;
	}
	else{
		cout << "No" << endl;
	}	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:44: error: expected ')' before '{' token
   60 |         if(sum%2==0 && sum%n==0 || sum/n==2{
      |           ~                                ^
      |                                            )
a.cc:66:1: error: expected primary-expression before '}' token
   66 | }
      | ^
Language: C++

#include<bits/stdc++.h> 
 
#define hell                         1000000007
#define hell2                        998244353
#define lcm(a,b)                     (a*b)/__gcd(a,b)
#define ll                           long long
#define vll                          vector<ll>
#define vi                           vector<int>
#define pll                          vector< pair<ll,ll> >
#define pb                           push_back
#define mp                           make_pair
#define all(v)                       v.begin(),v.end()
#define lbnd                         lower_bound
#define ubnd                         upper_bound
#define bs                           binary_search
#define F                            first
#define S                            second
#define rep(i,a,b)                   for(ll i=a;i<b;i++)
#define parr(a,n)                    for(ll it=0;it<n;it++) cout<<a[it]<<" ";cout<<endl;
#define pcont(a)                     for(auto it:a) cout<<it<<" ";cout<<endl;
#define ret(x)                       return cout<<x,0;
//#define endl                           '\n'
 
#define MAX 300005
using namespace std;

bool check(map<ll,ll> m, ll n) {
    if(n%3!=0) return false;
    if(m.size()!=3) return false;
    vll v;
    for(auto it:m) {
        if(it.S!=n/3) return false;
        v.pb(it.F);
    }
    if(v[0]^v[1]^v[2]!=0)return false;
    return true;
}

bool check2(map<ll,ll> m, ll n) {
    if(m.size()!=2) return false;
    vll v;
    for(auto it:m) {
        v.pb(it.F);
    }
    if(m[v[0]]==(2*n)/3 && m[v[1]]==n/3) return true;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);

    ll n;
    cin >> n;
    map<ll,ll> m;
    ll a[n];
    rep(i,0,n) {
        cin >> a[i];
        m[a[i]]++;
    }

    sort(a,a+n);
    if(a[0]==a[n-1] && a[0]==0) ret("Yes");

    ll a = check(m,n);
    ll b = check2(m,n);
    if(a || b) ret("Yes");
    ret("No");
}



Compiler output:
a.cc: In function 'int main()':
a.cc:64:8: error: conflicting declaration 'long long int a'
   64 |     ll a = check(m,n);
      |        ^
a.cc:55:8: note: previous declaration as 'long long int a [n]'
   55 |     ll a[n];
      |        ^
a.cc: In function 'bool check2(std::map<long long int, long long int>, long long int)':
a.cc:46:1: warning: control reaches end of non-void function [-Wreturn-type]
   46 | }
      | ^
Language: C++

/*input
4
1 2 3 2

*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define N 500005

int main() {
	int n;
	cin>>n;
	vector<pair<int,int> > a(5,make_pair(-1,-1));
	int poss = 0;
	int cnt =0;
	
	for(int i=0;i<n;i++){
		int x;
		cin>>x;
		int j =0;
		for(j=0;j<cnt;j++){
			if(x == a[j].first) {
				a[j].second ++;
				break;
			}
		}
		if(j!=cnt) continue;
		//cout<<x<<endl;
		a[cnt++] = make_pair(x,1);
		if(cnt > 3){ break;}

		
	}
	//cout<<cnt<<endl;

	if( cnt == 3 && ((a[0].first^a[1].first) == a[2].first)) {
		int maxdiff = abs(a[0].second - a[1].second);
		maxdiff = max(maxdiff , a[1].second - a[2].second);
		maxdiff = max(maxdiff , a[0].second - a[2].second);
		if(maxdiff<=1) poss = 1 ;
	}

	if(n%3 == 2){
		poss = 0;
	}

	if(cnt == 2 && (v[0].first == 0 || v[1].first == 0)) {
		if(abs(v[0].second - v[1].second) < = 1)
		poss =1;
	}
	if(poss) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:25: error: 'v' was not declared in this scope
   50 |         if(cnt == 2 && (v[0].first == 0 || v[1].first == 0)) {
      |                         ^
a.cc:51:53: error: expected primary-expression before '=' token
   51 |                 if(abs(v[0].second - v[1].second) < = 1)
      |                                                     ^
Language: C++

#include <iostream>
#include <algorithm>

int main(){
        long long int N,a[100000],count=0,A[5],dig[30];
        std::cin>>N;
        for(int i=0; i<N; i++)
                std::cin>>a[i];
        for(int i=0; i<N; i++) {
                if(a[i]!=0) count++;
        }
        if(count==0) {
                std::cout<<"Yes"<<std::endl;
                return 0;
        }
        count=0;
        if(N%3!=0) {
                std::cout<<"No"<<std::endl;
                return 0;
        }
        std::sort(a,a+N);
        for(int i=1; i<N; i++) {
                if(a[i-1]!=a[i]) {
                        count++;
                }
                if(count>2) {
                        std::cout<<"No"<<std::endl;
                        return 0;
                }
        }
        A[0]=a[0*N/3]; A[1]=a[N/3]; A[2]=a[2*N/3];
        for(int i=0; i<30; i++)
                dig[i]=0;
        for(int i=0; i<3; i++) {
                j=0;
                while(A[i]>0) {
                        if(A[i]%2==1)
                                dig[j]++;
                        A[i]=A[i]/2;
                        j++;
                }
        }
        for(int i=0; i<30; i++) {
                if(dig[i]==1||dig[i]==3) {
                        std::cout<<"No"<<std::endl;
                        return 0;
                }
        }
        std::cout<<"Yes"<<std::endl;
        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: error: 'j' was not declared in this scope
   35 |                 j=0;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  vector<int> data(N);
  
  for ( int i = 0; i < N; i++ ) {
    
    cin >> data.at(i);
    
  }
  
  bool ans = false;
  
  for ( int i = 0; i < N - 1; i++ ) {
    
	  if ( data.at(i) == data.at(i + 1) ) {
    
    	ans = true;
    
  	  }
  }
  
  if ( ans ) {
    cout << "YES" << endl;
  }
  else {
    cout << "NO" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:20: error: 'N' was not declared in this scope
    5 |   vector<int> data(N);
      |                    ^
Language: C++

#include<iostream>
#include<sstream>
#include<bitset>
#include<vector>
#include<algorithm>
using namespace std;

string bitplus(string a, string b){
    string ans("00000000000000000000000000000000");
    for(int i = 0 ; i < 32 ; i++){
        if((a[i] == '1' && b[i] == '1') || (a[i] == '0' && b[i] == '0') ){
            ans[i] = '0';
        }else{
            ans[i] = '1';
        }
    }
    return ans;
}

int main(){
    int n;
    cin >> n;
    vector <string> a(n);
    string ans = "Yes";
    int in;a
    stringstream ins;
    for(int i = 0 ; i < n ; i++){
        cin >> in;
        stringstream ins;
        ins << bitset<32>(in);
        a[i] = ins.str();
    }

    for(int i = 0 ; i < n-1 ;i++){
        bool flag = true;
        for(int j = i+1; j < n; j++){
            string ab = bitplus(a[i],a[j]);
            vector <string>::iterator is;
            is = find(a.begin(),a.end(),ab);

            if(is != a.end()){
                flag = false;
                break;
            }
        }
        if(flag){
            ans = "No";
            break;
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected ';' before 'stringstream'
   25 |     int in;a
      |             ^
      |             ;
   26 |     stringstream ins;
      |     ~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<sstream>
#include<bitset>
#include<vector>
#include<algolithm>
using namespace std;

string bitplus(string a, string b){
    string ans("00000000000000000000000000000000");
    for(int i = 0 ; i < 32 ; i++){
        if((a[i] == '1' && b[i] == '1') || (a[i] == '0' && b[i] == '0') ){
            ans[i] = '0';
        }else{
            ans[i] = '1';
        }
    }
    return ans;
}

int main(){
    int n;
    cin >> n;
    vector <string> a(n);
    string ans = "Yes";
    int in;
    stringstream ins;
    for(int i = 0 ; i < n ; i++){
        cin >> in;
        stringstream ins;
        ins << bitset<32>(in);
        a[i] = ins.str();
    }

    for(int i = 0 ; i < n-1 ;i++){
        bool flag = true;
        for(int j = i+1; j < n; j++){
            string ab = bitplus(a[i],a[j]);
            vector <string>::iterator is;
            is = find(a.begin(),a.end(),ab);

            if(is != a.end()){
                flag = false;
                break;
            }
        }
        if(flag){
            ans = "No";
            break;
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc:5:9: fatal error: algolithm: No such file or directory
    5 | #include<algolithm>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  vector<int) data(N);
  
  for ( int i = 0; i < N; i++ ) {
    
    cin >> data.at(i) >> endl;
    
  }
  
  bool ans = false;
  
  for ( int i = 0; i < N - 1; i++ ) {
    
	  if ( data.at(i) == data.at(i + 1) ) {
    
    	ans = true;
    
  	  }
  }
  
  if ( ans ) {
    cout << "YES" << endl;
  }
  else {
    cout << "NO" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: template argument 1 is invalid
    5 |   vector<int) data(N);
      |          ^~~
a.cc:5:10: error: template argument 2 is invalid
a.cc:5:13: error: expected unqualified-id before ')' token
    5 |   vector<int) data(N);
      |             ^
a.cc:7:24: error: 'N' was not declared in this scope
    7 |   for ( int i = 0; i < N; i++ ) {
      |                        ^
a.cc:9:17: error: overloaded function with no contextual type information
    9 |     cin >> data.at(i) >> endl;
      |                 ^~
a.cc:15:24: error: 'N' was not declared in this scope
   15 |   for ( int i = 0; i < N - 1; i++ ) {
      |                        ^
a.cc:17:21: error: overloaded function with no contextual type information
   17 |           if ( data.at(i) == data.at(i + 1) ) {
      |                     ^~
a.cc:17:35: error: overloaded function with no contextual type information
   17 |           if ( data.at(i) == data.at(i + 1) ) {
      |                                   ^~
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;

int main(){
	int N;
	cin >> N;
	vector<vll> vv;
	bool flg;
	for(int i=0; i<N; i++){
		ll a;
		cin >> a;
		flg=true;
		for(int j=0; j<vv.size(); j++){
			if(vv[j][0]==a){
				flg=false;
				vv[j][1]++;
				break;
			}
		}
		if(flg){
			vll v(2);
			v[0]=a;
			v[1]=1;
			vv.push_back(v);
		}
	}

	bool ok=false;
	if(vv.size()==1){
		if(vv[0][0]==0){
				cout << "Yes" << endl;
				return 0;
		}
	}else if(vv.size()==2){
		if((vv[0][0]==1 && vv[1][0]==0){
			if(vv[0][1]==2*vv[1][1]){
				ok=true;
			}
		}else if(vv[0][0]==0 && vv[1][0]==1){
			if(2*vv[0][1]==vv[1][1]){
				ok=true;
			}
		}
	}
	if(!ok){
		cout << "No" << endl;
		return 0;
	}

	if(N%3!=0){
		cout << "No" << endl;
		return 0;
	}
	if(vv.size()!=3){
		cout << "No" << endl;
		return 0;
	}
	if(vv[0][1]!=vv[1][1] || vv[1][1]!=vv[2][1] || vv[0][1]!=vv[2][1]){
		cout << "No" << endl;
		return 0;
	}
	if(vv[0][0]!=(ll)(vv[1][0]^vv[2][0])){
		cout << "No" << endl;
		return 0;
	}

	cout << "Yes" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:48: error: expected ')' before '{' token
   44 |                 if((vv[0][0]==1 && vv[1][0]==0){
      |                   ~                            ^
      |                                                )
a.cc:53:9: error: expected primary-expression before '}' token
   53 |         }
      |         ^
Language: C++

#include<iostream>
#include<sstream>
#include<bitset>
#include<vector>
using namespace std;

string bitplus(string a, string b){
    string ans("00000000000000000000000000000000");
    for(int i = 0 ; i < 32 ; i++){
        if((a[i] == '1' && b[i] == '1') || (a[i] == '0' && b[i] == '0') ){
            ans[i] = '0';
        }else{
            ans[i] = '1';
        }
    }
    return ans;
}

int main(){
    int n;
    cin >> n;
    vector <string> a(n);
    string ans = "Yes";
    int in;
    stringstream ins;
    for(int i = 0 ; i < n ; i++){
        cin >> in;
        stringstream ins;
        ins << bitset<32>(in);
        a[i] = ins.str();
    }

    for(int i = 0 ; i < n-1 ;i++){
        bool flag = true;
        for(int j = i+1; j < n; j++){
            string ab = bitplus(a[i],a[j]);
            vector <string>::iterator is;
            is = find(a.begin(),a.end(),ab);

            if(is != a.end()){
                flag = false;
                break;
            }
        }
        if(flag){
            ans = "No";
            break;
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:22: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   38 |             is = find(a.begin(),a.end(),ab);
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:38:22: note:   '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' is not derived from 'std::istreambuf_iterator<_CharT>'
   38 |             is = find(a.begin(),a.end(),ab);
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~