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

#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<iostream>
#include<queue>
#include<vector>
#include <bitset>
#include<math.h>
#include<map>
#include<set>
using namespace std;
#define INF 11000000000
#define MOD 1000000007
typedef long long ll;
typedef pair<ll,ll> P;

int main(){
  int N,count[3];
  ll temp;
  cin>>N;
  set<ll> S;
  map<ll,int> M;
  for(int i=0;i<N;i++){
    cin>>temp;
    S.insert(temp);
    if(M.find(temp)==M.end()) M[temp]=0;
    M[temp]++;
  }
  if(S.size()==1 && temp==0) cout<<"No"<<endl;
  else if(M.find(0)!=M.end() && M[0]=N/3*2 && N%3==0)
  else if(S.size()!=3) cout<<"No"<<endl;
  else{
    set<ll>::iterator it=S.begin();
    int i=0;
    for(;mt!=M.end();mt++){
      count[i]=mt->second;
      i++;
    }
    ll a=*it; it++;
    ll b=*it; it++;
    ll c=*it;
    if(a^b^c==0 && N%3==0 && count[0]==N/3 && count[1]==N/3 && count[2]==N/3) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:30: error: lvalue required as left operand of assignment
   30 |   else if(M.find(0)!=M.end() && M[0]=N/3*2 && N%3==0)
a.cc:31:3: error: expected primary-expression before 'else'
   31 |   else if(S.size()!=3) cout<<"No"<<endl;
      |   ^~~~
a.cc:35:10: error: 'mt' was not declared in this scope; did you mean 'it'?
   35 |     for(;mt!=M.end();mt++){
      |          ^~
      |          it
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int n = Integer.parseInt(sc.next());

      int[] a = new int[n];

      for(int i=0;i<n;i++){
        a[i] = Integer.parseInt(sc.next());
      }

      String ans = "No";

      Arrays.sort(a);

///////////////////////////////////////////////
if(a[n-1]==0){
  ans ="Yes";
}
///////////////////////////////////////////////

///////////////////////////////////////////////
if(n%3==0 && a[n/3-1]==0 && a[n/3]==a[n-1]){
  ans ="Yes";
}
///////////////////////////////////////////////

///////////////////////////////////////////////
if(n%3==0 && a[0]==a[n/3-1] && a[n/3]==a[2*n/3-1] && a[2*n/3]==a[n-1] && a[0]!=a[n/3] && a[n/3]!=a[n-1] && a[0]^a[n/3]^a[n-1]==0){
  ans ="Yes";
}
///////////////////////////////////////////////


      System.out.println(ans);

    }
}


Compiler output:
Main.java:32: error: bad operand types for binary operator '^'
if(n%3==0 && a[0]==a[n/3-1] && a[n/3]==a[2*n/3-1] && a[2*n/3]==a[n-1] && a[0]!=a[n/3] && a[n/3]!=a[n-1] && a[0]^a[n/3]^a[n-1]==0){
                                                                                                                      ^
  first type:  int
  second type: boolean
1 error
Language: C++

#include<iostream>
using namespace std;
#define int long long
void main(){
  int n;cin>>n;
  int now=0;
  for(int i=0;i<n;i++){
    int a;cin>>a;
    now^=a;
  }
  if(now==0)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}


Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(){
      | ^~~~
Language: C++

#include<iostream>
using namespace std;
#define int long long
int main(){
  int n;cin>>n;
  int now=0;
  for(int i=0;i<n;i++){
    int a;cin>>a;
    now^=a;
  }
  if(now==0)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vvi vector<vi>
#define DBG_N(hoge) cerr<<" "<<(hoge)<<endl;
#define DBG cerr<<"!"<<endl;
#define BITLE(n) (1LL<<((ll)n))
#define BITCNT(n) (__builtin_popcountll(n))
#define SUBS(s,f,t) ((s).substr((f)-1,(t)-(f)+1))
#define ALL(a) (a).begin(),(a).end()
using namespace std;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n;cin>>n;
  vi A(n);
  map<ll,ll>MP;
  for(auto &a:A){cin>>a;MP[a]++;}
  vi num;
  vi num2;
  for(auto a:MP){
    num.pb(a.S);
    num2.pb(a.F);
  }
  if(MP.size()>=3){
    cout<<"No"<<endl;
  }else if(MP.size()==3){
    if(num[0]==num[1]&&num[1]==num[2]){
      if((num2[0]^num2[1]) == num2[2]&&
	 (num2[1]^num2[2]) == num2[0]&&
	 (num2[2]^num2[0]) == num2[1])
	cout<<"Yes"<<endl;
      else cout<<"No"<<endl;
    }else cout<<"No"<<endl;
  }else if(MP.size()==2){
    if(num[0] == 2*num[1]){
      if(num2[0] == 0)cout<<"Yes"<<endl;
      else cout<<"No"<<endl;
    }else if(2*num[0] = num[1]){
      if(num2[1] == 0)cout<<"Yes"<<endl;
      else cout<<"No"<<endl;
    }else cout<<"No"<<endl;
  }else if(MP.size()==1){
    if(num2[0]==0)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:15: error: lvalue required as left operand of assignment
   48 |     }else if(2*num[0] = num[1]){
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007

ll even,odd;
bool ch[100010];
int main() {
	ll n;
	cin>>n;
	for(int i=0;i<n;i++){
		ll x;
		cin>>x;
		if(x%2==0){
			even++;
		}
		else{
			odd++;
		}
	}
	if(odd==0){
		cout << "Yes";
		return 0;
	}
	if(even==0){
		cout << "No";
		return 0;
	}
	ch[0]=false;
	ch[1]=true;
	ll even1=1;ll odd=1;
	for(int i=2;i<n;i++){
		if(ch[i-2]==ch[i-1]]){
			ch[i]=true;
			even1++;
		}
		else{
			ch[i]=false;
			odd++;
		}
	}
	if(even==even1&&odd1==odd){
		cout << "Yes";
		return 0;
	}
	cout << "No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:36: error: expected ')' before ']' token
   34 |                 if(ch[i-2]==ch[i-1]]){
      |                   ~                ^
      |                                    )
a.cc:34:36: error: expected primary-expression before ']' token
a.cc:43:25: error: 'odd1' was not declared in this scope; did you mean 'odd'?
   43 |         if(even==even1&&odd1==odd){
      |                         ^~~~
      |                         odd
Language: C++

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

bool solve(map<int, int>& count, int n) {
    if (count.size() == 1 && count.count(0) != 0) {
        return true;
    } else if (n % 3 == 0) {
        if (count.size() == 2 && count.count(0) == n / 3) {
            return true;
        } else if (count.size() == 3) {
            int sum = 0;
            for (auto& p : count) {
                if (p.second != n / 3) {
                    return false;
                }
                sum ^= p.first;
            }
            if (sum != 0) {
                return false;
            }
            return true;
        }
    }
    return false;
}

int main() {
    map<int, int> count;
    int n;
    cin >> n;
    for (int a; cin >> a; ) {
        count[a]++;
    }
    if (solve(count, n)) {
        count "Yes";
    } else {
        cout << "No";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:14: error: expected ';' before string constant
   36 |         count "Yes";
      |              ^~~~~~
      |              ;
Language: C++

#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define print(x) cout << (x) << endl;
#define sz(x) int(x.size())
 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll LLINF = 1LL<<60;
const int INF = 1<<29;
const int MOD = 1000000007;
 
void add(long long &a, long long b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
 
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};


int main(void){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<fixed<<setprecision(10);
    ll N;
    cin >> N;
    vector<ll> a(N);
    map<ll,ll> m;
    rep(i,N) cin >> a[i], m[a[i]]++;
    if(N % 3 != 0 || m.size() == 1){
      rep(i,N){
        if(a[i]) {
          print("No"); 
          return 0;
        }
      }
      print("Yes");
      return 0;
    }
    if(m.size() == 2){
      ll count = 0;
      rep(i,N) if(!a[i]) count++;
      if(count == N / 3){
        print("Yes"); 
        return 0;
      }
      print("No");
      return 0;
    }
    ll tmp = 0;
    if(m.size() == 3){
      for(auto itr = m.begin(); itr != m.end(); ++itr){
        if(itr->second() != N / 3){ print("No");
         return 0;
        }
        tmp ^= itr->first;
      }
      if(!tmp) {
        print("Yes"); 
        return 0;
      }
      print("No");
      return 0;
    }
    if(m.size() > 3) {
      print("No"); 
      return 0;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:23: error: expression cannot be used as a function
   59 |         if(itr->second() != N / 3){ print("No");
      |            ~~~~~~~~~~~^~
Language: C++

#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define print(x) cout << (x) << endl;
#define sz(x) int(x.size())
 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll LLINF = 1LL<<60;
const int INF = 1<<29;
const int MOD = 1000000007;
 
void add(long long &a, long long b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
 
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};


int main(void){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<fixed<<setprecision(10);
    ll N;
    cin >> N;
    vector<ll> a(N);
    map<ll,ll> m;
    rep(i,N) cin >> a[i], m[a[i]]++;
    if(N % 3 != 0 || m.size() == 1){
      rep(i,N){
        if(a[i]) {
          print("No"); 
          return 0;
        }
      }
      print("Yes");
      return 0;
    }
    if(m.size() == 2){
      ll count = 0;
      rep(i,N) if(!a[i]) count++;
      if(count == N / 3){
        print("Yes"); 
        return 0;
      }
      print("No");
      return 0;
    }
    ll tmp = 0;
    if(m.size() == 3){
      for(auto itr = num.begin(); itr != num.end(); ++itr){
        if(itr->second() != N / 3){ print("No");
         return 0;
        }
        tmp ^= itr->first;
      }
      if(!tmp) {
        print("Yes"); 
        return 0;
      }
      print("No");
      return 0;
    }
    if(m.size() > 3) {
      print("No"); 
      return 0;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:22: error: 'num' was not declared in this scope; did you mean 'enum'?
   58 |       for(auto itr = num.begin(); itr != num.end(); ++itr){
      |                      ^~~
      |                      enum
Language: C++

#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define print(x) cout << (x) << endl;
#define sz(x) int(x.size())
 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll LLINF = 1LL<<60;
const int INF = 1<<29;
const int MOD = 1000000007;
 
void add(long long &a, long long b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
 
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};


int main(void){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<fixed<<setprecision(10);
    ll N;
    cin >> N;
    vector<ll> a(N);
    map<ll,ll> m;
    rep(i,N) cin >> a[i], m[a[i]]++;
    if(N % 3 != 0 || m.size() == 1){
      rep(i,N){
        if(a[i]) {
          print("No"); 
          return 0;
        }
      }
      print("Yes");
      return 0;
    }
    if(m.size() == 2){
      ll count = 0;
      rep(i,N) if(!a[i]) count++;
      if(count == N / 3){
        print("Yes"); 
        return 0;
      }
      print("No");
      return 0;
    }
    ll tmp = 0;
    if(m.size() == 3){
      for(auto itr = num.begin(); itr != num.end(); ++itr){
        if(itr->second() != N / 3){ print("No");
         return 0;
        }
        tmp ^= itr->first;
      }
      if(!tmp) {
        print("Yes"); 
        return 0;
      }
      print("No");
      return 0;
    }
    if(m.size() > 3) print("No"), return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:22: error: 'num' was not declared in this scope; did you mean 'enum'?
   58 |       for(auto itr = num.begin(); itr != num.end(); ++itr){
      |                      ^~~
      |                      enum
a.cc:71:33: error: expected primary-expression before ',' token
   71 |     if(m.size() > 3) print("No"), return 0;
      |                                 ^
a.cc:71:35: error: expected primary-expression before 'return'
   71 |     if(m.size() > 3) print("No"), return 0;
      |                                   ^~~~~~
Language: C++

#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define print(x) cout << (x) << endl
#define sz(x) int(x.size())
 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll LLINF = 1LL<<60;
const int INF = 1<<29;
const int MOD = 1000000007;
 
void add(long long &a, long long b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
 
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};


int main(void){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<fixed<<setprecision(10);
    ll N;
    cin >> N;
    vector<ll> a(N);
    map<ll,ll> m;
    rep(i,N) cin >> a[i], m[a[i]]++;
    if(N % 3 != 0 || m.size() == 1){
      rep(i,N){
        if(a[i]) print("No"), return 0;
      }
      print("Yes");
      return 0;
    }
    if(m.size() == 2){
      ll count = 0;
      rep(i,N) if(!a[i]) count++;
      if(count == N / 3) print("Yes"), return 0;
      print("No");
      return 0;
    }
    ll tmp = 0;
    if(m.size() == 3){
      for(auto itr = num.begin(); itr != num.end(); ++itr){
        if(itr->second() != N / 3) print("No"), return 0;
        tmp ^= itr->first;
      }
      if(!tmp) print("Yes"), return 0;
      print("No"), return 0;
    }
    if(m.size() > 3) print("No"), return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:31: error: expected primary-expression before 'return'
   38 |         if(a[i]) print("No"), return 0;
      |                               ^~~~~~
a.cc:46:40: error: expected primary-expression before 'return'
   46 |       if(count == N / 3) print("Yes"), return 0;
      |                                        ^~~~~~
a.cc:52:22: error: 'num' was not declared in this scope; did you mean 'enum'?
   52 |       for(auto itr = num.begin(); itr != num.end(); ++itr){
      |                      ^~~
      |                      enum
a.cc:53:49: error: expected primary-expression before 'return'
   53 |         if(itr->second() != N / 3) print("No"), return 0;
      |                                                 ^~~~~~
a.cc:56:30: error: expected primary-expression before 'return'
   56 |       if(!tmp) print("Yes"), return 0;
      |                              ^~~~~~
a.cc:57:20: error: expected primary-expression before 'return'
   57 |       print("No"), return 0;
      |                    ^~~~~~
a.cc:59:35: error: expected primary-expression before 'return'
   59 |     if(m.size() > 3) print("No"), return 0;
      |                                   ^~~~~~
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 N;
ll A[100005];

string solve()
{
    sort(A, A + N);
    ll n = 1;
    FOR(i, N, 1)
    {
        if (A[i] != A[i - 1])
            n++;
    }
    if (n > 3)
        return "No";
    if (n == 1)
    {
        //! Aが0のみ
        if (A[0] == 0 && A[N - 1] == 0)
            return "Yes";
        else
            return "No";
    }

    if (N % 3 != 0)
        return "No";

    ll x = 0;
    ll f = 1, l = 1;
    FOR(i, N, 1)
    {
        if (A[i] != A[i - 1])
        {
            x = A[i];
            break;
        }
        f++;
    }
    FOR(i, N, 1)
    {
        if (A[N - 1 - i] != A[N - i])
            break;
        l++;
    }

    if (n == 2)
    {
        if (A[0] == 0 && l == 2 * f)
            return "Yes";
        else
            return "No";
    }

    if (A[0] ^ A[N - 1] == x && f == l && 3 * f == N)
        return "Yes";
    return "No";
}

int main()
{
    cin >> N;
    REP(i, N)
    {
        cin >> A[i];
    }
    return "Yes";
    // cout << solve() << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:78:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   78 |     return "Yes";
      |            ^~~~~
      |            |
      |            const char*
Language: C++

#include <bits/stdc++.h>
#define rg register
#define MEM(NAME) memset(NAME,0,sizeof NAME)
using namespace std;
typedef long long ll;
template<typename T>
inline bool read(T &n) {
    T ans = 0, flag = 1;
    char ch;
    while ((ch = getchar()) < '0' || ch > '9') if (ch == '-') flag = -1; else if (ch == EOF) return false;
    ans = ch - '0';
    while ((ch = getchar()) >= '0' && ch <= '9') ans = ans * 10 + ch - '0';
    n = ans * flag;
    return true;
}
inline ll read() {
    ll ans = 0, flag = 1;
    char ch;
    while ((ch = getchar()) < '0' || ch > '9') if (ch == '-') flag = -1;
    ans = ch - '0';
    while ((ch = getchar()) >= '0' && ch <= '9') ans = ans * 10 + ch - '0';
    return ans * flag;
};
int pre[100005];
unordered_map<int,int> M;
vector<int> v,v2;
int main() {
    int n,cnt=0;read(n);
    for(rg int i=1;i<=n;i++){
        read(pre[i]);
        if(M.find(pre[i])==M.end()) {
            M[pre[i]]=++cnt;
            v.push_back(1);
            v2.push_back(pre[i]);
        }
        else v[M[pre[i]]-1]++;
    }
    if(n%3==0){
        if((v.size()==2&&max(v[0],v[1])==2*min(v[0],v[1])&&(v2[0]==0||v2[1]==0)||(v.size()==1&&pre[1]==0)||(v.size()==3&&v[0]==v[1]&&v[1]==v[2]&&v2[0]^v2[1]==v2[2]))) puts("Yes");
        else puts("No");
    }
    else{
        if(v.size()==1&&pre[1]==0) puts("Yes");
        puts("No");
    }
    return 0;
}v

Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   29 |     for(rg int i=1;i<=n;i++){
      |                ^
a.cc: At global scope:
a.cc:47:2: error: 'v' does not name a type
   47 | }v
      |  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int N = (int) 1e5+5;

map<int,int> mp;
int n;
int a[100005];
int main(){
    iostream::sync_with_stdio(0);
    cin >> n;
    for(int i=1;i<=n;i++){
        cin >> a[i];
        mp[a[i]] ++;
    }
    if (n % 3){
        if (mp.size() != 1)
            cout << "No";
        else
            cout << "Yes";
    }
    else{
        bool ok = 1;
        int xorr = 0;
        for(auto v: mp)
            ok &= (v.second % (n/3) == 0),
            xorr ^ = (v.second == n/3 ? 0 : v.first),
            xorr ^ = (v.second == n/3*2 ? 0 : v.first),
            xorr ^ = (v.second == n/3*3 ? 0 : v.first);

        if (ok && xorr == 0)
            cout << "Yes";
        else
            cout << "No"; 
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:20: error: expected primary-expression before '=' token
   26 |             xorr ^ = (v.second == n/3 ? 0 : v.first),
      |                    ^
a.cc:27:20: error: expected primary-expression before '=' token
   27 |             xorr ^ = (v.second == n/3*2 ? 0 : v.first),
      |                    ^
a.cc:28:20: error: expected primary-expression before '=' token
   28 |             xorr ^ = (v.second == n/3*3 ? 0 : v.first);
      |                    ^
Language: C++

#include <iostream>

int main(){
	cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |         cout << "Yes" << endl;
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:4:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    4 |         cout << "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 <bits/stdc++.h>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-8;
const ll mod=1e9+7;
const int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};

int n;
vi a;

int main(){
	cin>>n;
	int A=-1,B=-1;
	a=vi(n);
	for(int i=0;i<n;i++){
		cin>>a[i];
		if(A==-1) A=a[i];
		else if(A!=a[i]&&B==-1) B=a[i];
	}
	if(B==-1&&A==0) cout<<"Yes"<<endl;
	else{
		vi b(n);
		b[0]=A,b[1]=B;
		for(int i=2;i<n;i++) b[i]=b[i-1]^b[i-2];
		bool flag=1;
		if(b[0]!=(b[n-1]^b[n-2])) flag=0;
		if(b[1]!=(b[0]^b[n-1])) flag=0;
		sort(a.begin(),a.end());
		sort(b.begin(),b.end());
		if(a!=b) flag=0;
		cout<<(flag?"Yes":"No")<<endl;
	}
}　

Compiler output:
a.cc:53:2: error: extended character 　 is not valid in an identifier
   53 | }　
      |  ^
a.cc:53:2: error: '\U00003000' does not name a type
   53 | }　
      |  ^~
Language: C++

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

vector <int> adj[300000+50];
int par[300000+50];
map <pair <int,int> , bool > vis;

int main()
{
    // cout << "Hello World!" << endl;
    ios::sync_with_stdio(false);
    int n,m,x,y;
    cin>>n>>m;
    for(int i=1;i<=m;i++){
        cin>>x>>y;
        adj[x].push_back(y);
        adj[y].push_back(x);
    }
    
    if(1){
        vector <int> src,dest;
        for(int i=1;i<=n;i++){
            par[i]=adj[i].size();
            par[i]%=2;
        }
        for(int i=1;i<=n;i++){
            if(par[i]==0){
                x=i;
                for(auto next : adj[i]){
                    y=next;
                    if(vis[{y,x}]==true){
                        
                    }
                    else{
                        vis[{x,y}]=true;
                        src.push_back(x);
                        dest.push_back(y);
                        par[y]=1-par[y];
                    }
                }
            
            }
        }
        if(src[i].size()<m){
            cout<<=1;
        }
        else
        for(int i=0;i<src.size();i++){
            cout<<src[i]<<" "<<dest[i]<<"\n";
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:16: error: 'i' was not declared in this scope
   44 |         if(src[i].size()<m){
      |                ^
a.cc:45:17: error: no match for 'operator<<=' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
   45 |             cout<<=1;
      |             ~~~~^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
                 from a.cc:1:
/usr/include/c++/14/cstddef:157:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType>& std::operator<<=(byte&, _IntegerType)'
  157 |     operator<<=(byte& __b, _IntegerType __shift) noexcept
      |     ^~~~~~~~
/usr/include/c++/14/cstddef:157:5: note:   template argument deduction/substitution failed:
a.cc:45:13: note:   cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte&'
   45 |             cout<<=1;
      |             ^~~~
Language: Java

import java.util.*;
public class Main{
  public static void main(String[]args){
	Scanner sc=new Scanner(System.in);
    TreeMap<Integer,Integer>m=new TreeMap<Integer,Integer>();
    int n=sc.nextInt();
    for(int i=0;i<n;i++){
      int x=sc.nextInt();
      m.put(x,m.containsKey(x)?m.get(x)+1:1);
    }
    boolean b=n%3==0;
    for(int x:m.keySet())
      if(m.get(x)%(n/3)!=0)
        b=false;
    if(m.keySet().size()==1&&m.firstKey()!=0)
      b=false;
    if(m.keySet().size()==2&&(m.firstKey()!=0||m.get(m.firstKey())!=2*n/3))
      b=false;
    if(m.keySet().size()==3&&m.pollFirstEntry().getKey()!=m.firstKey()^m.lastKey())
      b=false;
    System.out.println(b?"Yes":"No");
  }
}

Compiler output:
Main.java:19: error: bad operand types for binary operator '^'
    if(m.keySet().size()==3&&m.pollFirstEntry().getKey()!=m.firstKey()^m.lastKey())
                                                                      ^
  first type:  boolean
  second type: Integer
1 error
Language: Java

import java.util.*;
public class Main{
  public static void main(String[]args){
	Scanner sc=new Scanner(System.in);
    TreeMap<Integer,Integer>m=new TreeMap<Integer,Integer>();
    int n=sc.nextInt();
    for(int i=0;i<n;i++){
      int x=sc.nextInt();
      m.put(x,m.containsKey(x)?m.get(x)+1:1);
    }
    boolean b=n%3==0;
    for(int x:m.keySet())
      if(m.get(x)%(n/3)!=0)
        b=false;
    if(m.keySet().size()==1&&m.firstKey()!=0)
      b=false;
    if(m.keySet().size()==2&&(m.firstKey()!=0||m.get(m.firstKey())!=2*n/3))
      b=false;
    if(m.keySet().size()==3&&m.pollFirstEntry().key()!=m.firstKey()^m.lastKey())
      b=false;
    System.out.println(b?"Yes":"No");
  }
}

Compiler output:
Main.java:19: error: cannot find symbol
    if(m.keySet().size()==3&&m.pollFirstEntry().key()!=m.firstKey()^m.lastKey())
                                               ^
  symbol:   method key()
  location: interface Entry<Integer,Integer>
1 error
Language: C++


            puts("No");
        }
        return 0;
    }
    for(int i = 0; i < 3; ++i)
    {
        b[i] = a[i * n / 3];
        for(int j = 1; j < n / 3; ++j)
        {
            if(b[i] != a[i * n / 3 + j])
            {
                puts("No");
                return 0;
            }
        }
    }
    if((b[0] ^ b[1]) == b[2] || (b[0] ^ b[2]) == b[1] || (b[1] ^ b[2]) == b[0])
    {
        puts("Yes");
    }
    else
    {
        puts("No");
    }
    return 0;
}

Compiler output:
a.cc:2:17: error: expected constructor, destructor, or type conversion before '(' token
    2 |             puts("No");
      |                 ^
a.cc:3:9: error: expected declaration before '}' token
    3 |         }
      |         ^
a.cc:4:9: error: expected unqualified-id before 'return'
    4 |         return 0;
      |         ^~~~~~
a.cc:5:5: error: expected declaration before '}' token
    5 |     }
      |     ^
a.cc:6:5: error: expected unqualified-id before 'for'
    6 |     for(int i = 0; i < 3; ++i)
      |     ^~~
a.cc:6:20: error: 'i' does not name a type
    6 |     for(int i = 0; i < 3; ++i)
      |                    ^
a.cc:6:27: error: expected unqualified-id before '++' token
    6 |     for(int i = 0; i < 3; ++i)
      |                           ^~
a.cc:18:5: error: expected unqualified-id before 'if'
   18 |     if((b[0] ^ b[1]) == b[2] || (b[0] ^ b[2]) == b[1] || (b[1] ^ b[2]) == b[0])
      |     ^~
a.cc:22:5: error: expected unqualified-id before 'else'
   22 |     else
      |     ^~~~
a.cc:26:5: error: expected unqualified-id before 'return'
   26 |     return 0;
      |     ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

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

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define ALL(v) (v).begin(), (v).end()
#define p(s) cout<<(s)<<endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#define br() p("")
#define pn(s) cout << (#s) << " " << (s) << endl

// false solutions

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

    // input
    ll N;
    cin >> N;

    vector<ll> A(N);
    FOR(i, 0, N){
        cin >> A.at(i);
    }

    ll x = 0;
    for(ll a : A){
        x ^= a;
    }

    if(x==0){
        p_yes();
    }else{
        p_no();
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:9: error: 'p_yes' was not declared in this scope
   36 |         p_yes();
      |         ^~~~~
a.cc:38:9: error: 'p_no' was not declared in this scope; did you mean 'pn'?
   38 |         p_no();
      |         ^~~~
      |         pn
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
using ll = long long;

// 任意の隣接3項のビットごとの排他的論理和が0 <=> "Yes"
// => 3つおきに等しくなる

int main() {
    int N;
    cin >> N;
    vector<int>a(N);
    for (int i = 0; i < N; ++i) {
        cin >> a[i];
    }

    int flag = 0;
    sort(a.begin(), a.end());

    if(a.back() == 0) flag = 1;
    if(N % 3 == 0){
        if(a[0] == a[N/3 - 1] && a[N/3] == a[(N/3)*2 - 1] && a[(N/3)*2] == a[N-1]){
            if(a[0] == 0){
                if(a[N/3] == a[(N/3)*2]) flag = 1;
            }else if(a[0] != a[N/3] && a[N/3] != a[(N/3)*2])
                if(a[0] ^ a[N/3] ^ a[(N/3)*2] == 0) flag = 1;
            }
        }
    }

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

Compiler output:
a.cc:31:5: error: expected unqualified-id before 'if'
   31 |     if(flag == 1){
      |     ^~
a.cc:33:6: error: expected unqualified-id before 'else'
   33 |     }else {
      |      ^~~~
a.cc:36:5: error: expected unqualified-id before 'return'
   36 |     return 0;
      |     ^~~~~~
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
Language: C++

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

int main(){
  z n;
  cin >> n;
  vector<int> vec(1);
  long long a = -1, b = -1, c = -1;
  long long acount = 0, bcount = 0, ccount = 0;
  for(long long i=0; i<n; i++){
    long long num;
    cin >> num;
    if(i == 0) a = num;
    else if(a != num && b == -1) b = num;
    else if(a != num && b != num && c == -1) c = num;
    else if(a != num && b != num && c != num){
      cout << "No" << endl;
      return 0;
    }
    if(a == num) acount++;
    if(b == num) bcount++;
    if(c == num) ccount++;
  }
  if(a != -1 && b != -1 && c != -1 && acount == n/3 && bcount == n/3 && ccount == n/3){
    if((a ^ b) == c){
      cout << "Yes" << endl;
      return 0;
    }
  }else if(c == -1 && ((a == 0 && bcount - acount == acount) || (b == 0 && acount - bcount == bcount))){
    cout << "Yes" << endl;
    return 0;
  }else if(a == 0 && b == -1 && c == -1){
    cout << "Yes" << endl;
    return 0;
  }else{
    cout << "No" << endl;
    return 0;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'z' was not declared in this scope
    6 |   z n;
      |   ^
a.cc:7:10: error: 'n' was not declared in this scope
    7 |   cin >> n;
      |          ^
Language: Java

import java.util.*;

public class Main {

    long INF = Long.MAX_VALUE;

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] a = new long[N];
        boolean ans = true;
        for (int i = 0; i < N; i++) {
            a[i] = sc.nextLong();
            if (i >= 2 && i < N && ans) {
                ans = a[i - 1] == (a[i - 2] ^ a[i]);
            }
        }
        if ((a[0] == (a[1] ^ a[N - 1])) && (a[N - 1] == (a[N - 2] ^ a[0]))) {
        } else {
            ans = false;
        }
        if(ans){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }

Compiler output:
Main.java:31: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

public class Main {

    long INF = Long.MAX_VALUE;

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] a = new long[N];
        boolean ans = true;
        for (int i = 0; i < N; i++) {
            a[i] = sc.nextLong();
            if (i >= 2 && i < N) {
                ans = a[i - 1] == (a[i - 2] ^ a[i]);
            }
        }
        if ((a[0] == (a[1] ^ a[N - 1])) && (a[N - 1] == (a[N - 2] ^ a[0]))) {
        } else {
            ans = false;
        }
        if(ans){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}


Compiler output:
Main.java:10: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:10: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main {

    long INF = Long.MAX_VALUE;

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] a = new long[N];
        boolean ans = true;
        for (int i = 0; i < N; i++) {
            a[i] = sc.nextLong();
            if (i >= 2 && i < N) {
                if (a[i - 1] == (a[i - 2] ^ a[i])) {
                    ans = true;
                } else {
                    ans = false;
                }
            }
        }
        if ((a[0] == (a[1] ^ a[N - 1])) && (a[N - 1] == (a[N - 2] ^ a[0]))) {
        } else {
            ans = false;
        }
        if(ans){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}


Compiler output:
Main.java:10: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:10: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main(){
  long long n;
  cin >> n;
  vector<int> vec;
  long long a = -1, b = -1, c = -1;
  long long acount = 0, bcount = 0, ccount = 0;
  for(long long i=0; i<n; i++){
    long long num;
    cin >> num;
    if(i == 0) a = num;
    else if(a != num && b == -1) b = num;
    else if(a != num && b != num && c == -1) c = num;
    else if(a != num && b != num && c != num){
      cout << "No" << endl;
      return 0;
    }
    if(a == num) acount++;
    if(b == num) bcount++;
    if(c == num) ccount++;
  }
  if(a != -1 && b != -1 && c != -1 && acount == bcount && bcount == ccount && ccount == acount){
    if(a ^ b ^ c == 0){
      cout << vec[9][1];
      cout << "Yes" << endl;
      return 0;
    }
  }else if(c == -1 && ((a == 0 && bcount - acount == acount) || (b == 0 && acount - bcount == bcount))){
    cout << "Yes" << endl;
    return 0;
  }else if(a == 0 && b == -1 && c == -1){
    cout << "Yes" << endl;
    return 0;
  }else{
    cout << "No" << endl;
    return 0;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:21: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   27 |       cout << vec[9][1];
      |                     ^
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++;
		}
		else{
			sum1++;
		}
		// if(a[i]%2==0){
		// 	sum1+=a[i];
		// }
		// else{ 
		// 	sum2+=a[i];
		// }
	}

	if(sum==0){
		cout << "Yes" << endl;
	}
	else if(ans==n/3 && sum1==2*n/3){
		cout << "Yes" << endl;
	}
	else(){
		cout << "No" << endl;
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:69:14: error: expected primary-expression before ')' token
   69 |         else(){
      |              ^
Language: C++

#include <iostream>

int main(void){
cout<<"Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 | cout<<"Yes";
      | ^~~~
      | std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

public class PAFalse {

	public static boolean calcThisLevel(long[] a, long[] b, long mod, long ans) {
		// bがひとつ前の位の10として
		// 0がすべて一致するか，
		// 0がすべて1になるかしないといけない
		int cnt = 0;
		int cnt0 = 0;
		int mode = 0;
		//System.out.println("cnt=" + cnt + ":" + "cnt0=" + cnt0 + ":" + "ans=" + ans);
		for (int i = 0; i < a.length; i++) {
			//System.out.println(a[i] + ":" + a[i] % mod + ":" + "b[i]=" + b[i]);
			//if (b[i] == 0) {
				//System.out.println("mode:" + mode + ":" + (mode == 2 && a[i] == ans));
			//	if (mode == 0 && a[i] == 0)
			//		mode = 2;
			//	else if (mode == 0 && a[i] == ans)
			//		mode = 1;
			//	else if (mode == 1 && a[i] == 0)
			//		return false;
			//	else if (mode == 2 && a[i] == ans)
			//		return false;
			//}

			if (a[i] % mod == ans) {
				cnt++;
				a[i] -= ans;
				b[i] = 1;
			} else {
				cnt0++;
				b[i] = 0;
			}
		}
		//System.out.println("cnt=" + cnt + ":" + "cnt0=" + cnt0 + ":" + "ans=" + ans);
		if (cnt == a.length * 2 / 3 || cnt0 == a.length)
			return true;
		else
			return false;
	}

	public static boolean calcThisLevel1st(long[] a, long[] b, long mod, long ans) {
		int cnt = 0;
		int cnt0 = 0;
		for (int i = 0; i < a.length; i++) {
			//System.out.println(a[i] + ":" + a[i] % mod);

			if (a[i] % mod == ans) {
				cnt++;
				a[i] -= ans;
				b[i] = 1;
			} else {
				cnt0++;
				b[i] = 0;
			}
		}
		if (cnt == a.length * 2 / 3 || cnt0 == a.length)
			return true;
		else
			return false;
	}

	public static boolean check0(long[] a) {
		for (int i = 0; i < a.length; i++) {
			if (a[i] != 0) {
				return false;
			}
		}
		return true;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		long[] a = new long[N];
		long[] b = new long[N];
		long MaxA = 0;
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextLong();
			b[i] = 0;
			if (a[i] > MaxA)
				MaxA = a[i];
		}
		MaxA *= 2;
		sc.close();

		//System.out.println(MaxA);
		// 9
		// 3 2 3 3 2 3 1 0 1
		// これでNoが出せないそれがWA
		// というか嘘解法
		// 6
		// 59157337 55005153 12707000 59157337 55005153 12707000

		if (check0(a)) {
			System.out.println("Yes");
			return;
		}

		if (N % 3 != 0) {
			System.out.println("No");
			return;
		}

		long mod = 2;
		long ans = 1;
		do {
			if (mod == 2) {
				if (!calcThisLevel1st(a, b, mod, ans)) {
					System.out.println("No");
					return;
				}
			} else {
				if (!calcThisLevel(a, b, mod, ans)) {
					System.out.println("No");
					return;
				}
			}
			mod *= 2;
			ans *= 2;
		} while (mod < MaxA);

		System.out.println("Yes");
		return;
	}
}

Compiler output:
Main.java:1: error: class PAFalse is public, should be declared in a file named PAFalse.java
public class PAFalse {
       ^
Main.java:72: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class PAFalse
Main.java:72: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class PAFalse
3 errors
Language: C++

#include <stdio.h>
#include <algorithm>
#include <vector>
#include <string>
const long long mod = 1000000007;

struct D {
	int a, n;
};

int search(D* d, int t, int n) {
	if (d[0].a == t)return 0;
	int r = 0;
	for (int i = 20; i >= 0; i--) {
		int c = r + 1 << i;
		if (c >= n)continue;
		if (d[c].a == t)return c;
		if (d[c].a < t)r = c;
	}
	return -1;
}

int main() {
	int N;
	scanf("%d", &N);
	int *a = new int[N];
	for (int i = 0; i < N; i++) {
		scanf("%d", a + i);
	}
	std::sort(a, a + N);
	std::vector<D> d;
	for (int i = 0; i < N; i++) {
		if (i != 0 && d[d.size() - 1].a == a[i]) {
			d[d.size() - 1].n++;
		}
		else {
			d.push_back({ a[i],1 });
		}
	}
	bool can = false;
	d[0].n--;
	int n = d.size();
  if(n>=1000){printf("No");return 0;}
	for (int i = 0; i < n; i++) {
		int bb = d[0].a, b;
		if (d[i].n == 0)continue;
		b = d[i].a;
		int c = search(d.data(), bb^b, n);
		if (c != -1 && d[c].n > 0) {
			std::vector<D> e;
			for (int j = 0; j < n; j++) {
				e.push_back(d[j]);
			}
			e[i].n--;
			can = true;
			for (int j = 0; j < N - 2; j++) {
				int c = search(e.data(), bb^b, n);
				if (c != -1 && e[c].n > 0) {
					bb = b;
					b = e[c].a;
					e[c].n--;
				}
				else {
					can = false;
					break;
				}
			}
			if (can) {
				if (bb^b == e[0].a) {
					break;
				}
				else {
					can = false;
				}
			}*/
		}
	}
	printf(can ? "Yes" : "No");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:27: error: expected primary-expression before '/' token
   75 |                         }*/
      |                           ^
a.cc:76:17: error: expected primary-expression before '}' token
   76 |                 }
      |                 ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  vector<int> a(N);
  for(int i=0; i<N; ++i) {
    int in;
    cin >> in;
    a[i] = in;
  }
  
  int tmp = a[0];
  for(int i=1; i<N; ++i) {
    tmp = tmp ^ a[i];
  }
  
  if(tmp==0) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
const int maxn=3e5+10;
map<int,int> ss;
int n,x;

int main(){
    scanf("%d",&n);
    bool zt=true;
    for(int i=1;i<=n;i++){
       scanf("%d",&x);
       ss[x]++;
       z&=(x==0);
    }
    if(z)return !printf("YES\n");
    int sz=ss.size();
    if(n%3){
        printf((sz==1&&(ss.count(0)))?"Yes\n":"No\n");
    }
    else{
        if(!(sz==2||sz==3))return !printf("No\n");
        if(sz==2){
            return !printf((((ss.begin()->first)==0)&&(ss.begin()->second)==(n/3))?"Yes\n":"No\n");
        }
        auto it=ss.begin();
        int a=it->first,aa=it->second;++it;
        int b=it->first,bb=it->second;++it;
        int c=it->first,cc=it->second;
        if(!(aa==bb&&bb==cc))return !printf("No\n");
        if(a^b!=c)return !printf("No\n");
        printf("Yes\n");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'z' was not declared in this scope
   13 |        z&=(x==0);
      |        ^
a.cc:15:8: error: 'z' was not declared in this scope; did you mean 'zt'?
   15 |     if(z)return !printf("YES\n");
      |        ^
      |        zt
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int maxn=3e5+10;
map<int,int> ss;
int n,x;

int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
       scanf("%d",&x);
       ss[x]++;
    }
    int sz=ss.size();
    if(n%3){
        printf((sz==1&&(ss.count(0)))?"Yes\n":"No\n");
    }
    else{
        if(!(sz==2||sz==3))return !printf("No\n");
        if(sz==2){
            return !printf((ss.begin()->first==0&&ss.begin()->second=(n/3))?"Yes\n":"No\n");
        }
        auto it=ss.begin();
        int a=it->first,aa=it->second;++it;
        int b=it->first,bb=it->second;++it;
        int c=it->first,cc=it->second;
        if(!(aa==bb&&bb==cc))return !printf("No\n");
        if(a^b!=c)return !printf("No\n");
        printf("Yes\n");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:49: error: lvalue required as left operand of assignment
   20 |             return !printf((ss.begin()->first==0&&ss.begin()->second=(n/3))?"Yes\n":"No\n");
      |                             ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N;cin>>N;
    std::vector<int> a(N);
    std::set<int> s;
    for(int i=0;i<N;i++){
        cin>>a.at(i);
        s.insert(a.at(i));
    }
    
    if(*rbegin(s)==0&&s.size()==1){
        cout<<"Yes"<<endl;
        return 0;
    }
    else if(s.size() != 3){
        cout<<"No"<<endl;
        return 0;
    }
    else{
        vector<int> c(3),d(3,0);
        c.at(0) = *begin(s);
        c.at(1) = *rbegin(s);
        s.erase(c.at(0));
        c.at(2) = *begin(s);
        int f,g,h;
        f=c.at(0);g=c.at(1);h=c.at(2);
        
        while(g>0||h>0){
            if((f%2+g%2+h%2)%2!=0){
                cout <<"No"<<endl;
                return 0;
            }
            else{
                f/=2;g/=2;h/=2;//gが最大値なのは明白
            }
        }
        
        for(int i=0;i<N;i++){
            for(int j=0;j<3;j++){
                if(c.at(j)==a.at(i)) d.at(j)++;
            }//setでは数値にアクセスできないからvectorに直す。それぞれの数の帽子の個数を調べる。
        }
        if(d.at(0)==d.at(1)&&d.at(0)==N/3)){
            cout <<"Yes"<<endl;
        }
        else cout <<"No "<<endl;
    }
}
//これであってないとかふざけんな死ね


Compiler output:
a.cc: In function 'int main()':
a.cc:44:43: error: expected primary-expression before ')' token
   44 |         if(d.at(0)==d.at(1)&&d.at(0)==N/3)){
      |                                           ^