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

// #pragma GCC target("avx2")
#pragma GCC optimize("O3", "unroll-loops")

// #include <bits/extc++.h>
// using namespace __gnu_pbds;

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

#define int long long
#define double long double
// template <typename T>
// using pbds_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
using pii = pair<int, int>;
template<typename T>
using prior = priority_queue<T, vector<T>, greater<T>>;
template<typename T>
using Prior = priority_queue<T>;

#define X first
#define Y second
#define ALL(x) (x).begin(), (x).end()
#define eb emplace_back
#define pb push_back

#define fastIO() ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define RANDOM() random_device __rd; \
                 mt19937 __gen = mt19937(__rd()); \
                 uniform_int_distribution<int> __dis(0, 1); \
                 auto rnd = bind(__dis, __gen);

const int INF = 1E18;
const int mod = 1E9 + 7;

int32_t main() {
    fastIO();
    
    int n;
    cin >> n;
    
    vector<int> v(n);
    for (auto &x : v) cin >> x;
    sort(ALL(v));
    
    if (n % 3 == 0) {
        if ((v[0] ^ v[n/3]) != v[2*n/3]) return cout << "No\n", 0;
        for (int i =       1; i <   n/3; ++i) if (v[i] != v[i-1]) return cout << "No\n";
        for (int i =   n/3+1; i < 2*n/3; ++i) if (v[i] != v[i-1]) return cout << "No\n";
        for (int i = 2*n/3+1; i <   n  ; ++i) if (v[i] != v[i-1]) return cout << "No\n";
        return cout << "Yes\n", 0;
    }
    else for (auto x : v) if (x) return cout << "No\n", 0;
    
    return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:47:79: error: cannot convert 'std::basic_ostream<char>' to 'int32_t' {aka 'int'} in return
   47 |         for (int i =       1; i <   n/3; ++i) if (v[i] != v[i-1]) return cout << "No\n";
      |                                                                          ~~~~~^~~~~~~~~
      |                                                                               |
      |                                                                               std::basic_ostream<char>
a.cc:48:79: error: cannot convert 'std::basic_ostream<char>' to 'int32_t' {aka 'int'} in return
   48 |         for (int i =   n/3+1; i < 2*n/3; ++i) if (v[i] != v[i-1]) return cout << "No\n";
      |                                                                          ~~~~~^~~~~~~~~
      |                                                                               |
      |                                                                               std::basic_ostream<char>
a.cc:49:79: error: cannot convert 'std::basic_ostream<char>' to 'int32_t' {aka 'int'} in return
   49 |         for (int i = 2*n/3+1; i <   n  ; ++i) if (v[i] != v[i-1]) return cout << "No\n";
      |                                                                          ~~~~~^~~~~~~~~
      |                                                                               |
      |                                                                               std::basic_ostream<char>
Language: C++

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

typedef long long ll;
typedef pair<int, int> ii;

int n, a;
map<int, int> cnt;

int main(int argc, char const *argv[]) {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a);
    ++cnt[a];
  }
  if (cnt.size() == 1) {
    puts(cnt[0] == n ? "Yes" : "No");
  } else if (cnt.size() == 2) {
    int a = cnt.begin()->second, b = cnt.rbegin()->second;
    if (a > b) swap(a, b);
    puts((2 * a == b && cnt[0] == a) ? "Yes" : "No");
  } else if (cnt.size() == 3) {
    int sum = 0, flag = 1;
    for (auto it : cnt) {
      sum ^= it.first;
      flag &= it->second == n / 3;
    }
    puts((!sum && flag) : "Yes" : "No");
  } else {
    puts("No");
  }
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:26:17: error: base operand of '->' has non-pointer type 'std::pair<const int, int>'
   26 |       flag &= it->second == n / 3;
      |                 ^~
a.cc:28:24: error: expected ')' before ':' token
   28 |     puts((!sum && flag) : "Yes" : "No");
      |         ~              ^~
      |                        )
a.cc:28:16: error: cannot convert 'bool' to 'const char*'
   28 |     puts((!sum && flag) : "Yes" : "No");
      |          ~~~~~~^~~~~~~~
      |                |
      |                bool
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const static ll INF = 1e9;
const static ll MOD = 1e9+7;


int main(){
    int N; cin >> N;
    //if(N % 3 != 0){cout << "No" << endl; return 0;}
    map<int, int> M; 
    for(int i = 0; i < N; i++) { int x; cin >> x; M[x]++;}
    set<int> ST; for(auto m : M) ST.insert(m.first);
    if(M.size() > 3){ cout << "No" << endl; return 0;}
    else if(M.size() == 2){
        for(auto st : ST){
            bool flag = true;
            if(st == 0 && M[st] == (N/3)) continue;
            else if(st != 0 && M[st] == 2*(N/3))continue;
            else flag = false;
            if(flag) cout << "Yes" << endl;
            else cout << "No" << endl;
        }
    }
    else if(M.size() == 1){
        if(M[0] == N) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
    else {
        bool flag = true;
        for(auto m : M) if(m.second != N/3) flag = false;
        vector<ll> V; for(auto m : M) V.push_back(m.first);
        if((V[0]^V[1]) == V[2] && (V[1]^V[2]) == V[0] && (V[2]^V[0]) == V[1])) continue;
        else flag = false;
        if(flag) cout << "Yes" << endl;
        else cout << "No" << endl;
    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:78: error: expected primary-expression before ')' token
   33 |         if((V[0]^V[1]) == V[2] && (V[1]^V[2]) == V[0] && (V[2]^V[0]) == V[1])) continue;
      |                                                                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const static ll INF = 1e9;
const static ll MOD = 1e9+7;


int main(){
    int N; cin >> N;
    //if(N % 3 != 0){cout << "No" << endl; return 0;}
    map<int, int> M; 
    for(int i = 0; i < N; i++) { int x; cin >> x; M[x]++;}
    set<int> ST; for(auto m : M) ST.insert(m.first);
    if(M.size() > 3){ cout << "No" << endl; return 0;}
    else if(M.size() == 2){
        for(auto st : ST){
            bool flag = true;
            if(st == 0 && M[st] == (N/3)) continue;
            else if(st != 0 && M[st] == 2*(N/3))continue;
            else flag = false;
            if(flag) cout << "Yes" << endl;
            else cout << "No" << endl;
        }
    }
    else if(M.size() == 1){
        if(M[0] == N) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
    else {
        bool flag = true;
        for(auto m : M) if(m.second != N/3) flag = false;
        vector<ll> V; for(auto m : M) V.push_back(m.first);
        if((V[0]^V[1]) == V[2] && (V[1]^V[2]) == V[0] && (V[2]^V[0]) == V[1]) continue;
        else flag = false;
        if(flag) cout << "Yes" << endl;
        else cout << "No" << endl;
    }


}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:79: error: continue statement not within a loop
   33 |         if((V[0]^V[1]) == V[2] && (V[1]^V[2]) == V[0] && (V[2]^V[0]) == V[1]) continue;
      |                                                                               ^~~~~~~~
Language: C++

#include <iostream>
#include <map>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
#define ll long long
ll a[100005];
int main(int argc, char** argv) {
	map<int,int>cnt,vis; 
	int n;
	cin>>n;
	ll ans=0,a2=0,aa=0,b=0,c=0; 
	rep(i,1,n)
	scanf("%lld",&a[i]),cnt[a[i]]++,ans^=a[i],a2=max(a2,a[i]);
	rep(i,1,n)
	{
		if(!aa&&!vis.count(a[i]))aa=a[i];
		else if(!b&&!vis.count(a[i]))b=a[i];
		else if(!c&&!vis.count(a[i]))c=a[i];
		vis[a[i]]++;
	}
	if(n==3&&a[1]^a[2]^a[3]==0))
	{
		printf("Yes");
		return 0;
	}
	if(a2==0)
	{
		printf("Yes");
		return 0;
	}

	if(ans!=0||(n%3!=0)||(!aa||!b||!c)||(aa^b!=c)||(cnt[aa]!=cnt[b])||(cnt[aa]!=cnt[c]))
	{
		printf("No");
		return 0;
	}
	printf("Yes");
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:22:36: error: expected primary-expression before ')' token
   22 |         if(n==3&&a[1]^a[2]^a[3]==0))
      |                                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
#define tii tuple<int,int,int>
#define Priq priority_queue<int,vi,greater<int>>
#define pb push_back
#define mp make_pair
#define INF (1ll<<60)
signed main(){
  int N; cin>>N;
  vi A(60);
  rep(i,0,N){
    int X; cin>>X;
    bitset<60> B(X);
    rep(j,0,60){
      if(B.test(j)) A[j]++;
    }
  }
  string ans="No";
  if(N%3==0){
    ans="Yes";
    rep(i,0,60){
      if(A[j]!=0&&A[j]!=N*2/3){
        ans="No";
        break;
      }
    }
  }
  cout<<ans<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:33:12: error: 'j' was not declared in this scope
   33 |       if(A[j]!=0&&A[j]!=N*2/3){
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define all(a)  (a).begin(),(a).end()
typedef long long ll;
const ll mod=1000000007;
#define repi(i,a,b) for(ll i=ll(a);i<ll(b);++i)

int main() {
  int n;cin>>n;
  map<int,int> mp;
  for(int i=0;i<n;++i){
    int a;cin>>a;
    if(mp.find(a)!= mp.end()){
      mp[a] +=1;
    } else {
      mp[a] =1;
    }
  }
  if(mp.size()==1){
    if(mp.begin()->first==0){
      cout << "Yes" << endl;
      return 0;
    }
  } else if(mp.size()==2){
    if(n%3==0){
      if(mp[0]==n/3){
        cout << "Yes" << endl;
        return 0;
      }
    }
  } else if(n%3==0 && mp.size()==3) {
    vector<int> v,cnt;
    for(auto itr = mp.begin();itr!= mp.end();++itr){
      v.push_back(itr->first);
      cnt.push_back(itr->second);
    }
    if(v[0]^v[1]^v[1]&&c[0]==n/3&&c[1]==n/3&&c[2]==n/3){
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No"<< endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:24: error: 'c' was not declared in this scope
   37 |     if(v[0]^v[1]^v[1]&&c[0]==n/3&&c[1]==n/3&&c[2]==n/3){
      |                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define all(a)  (a).begin(),(a).end()
typedef long long ll;
const ll mod=1000000007;
#define repi(i,a,b) for(ll i=ll(a);i<ll(b);++i)

int main() {
  int n;cin>>n;
  map<int,int> mp;
  for(int i=0;i<n;++i){
    int a;cin>>a;
    if(mp.find(a)!= mp.end()){
      mp[a] +=1;
    } else {
      mp[a] =1;
    }
  }
  if(mp.size()==1){
    if(mp.begin()->first==0){
      cout << "Yes" << endl;
      return 0;
    }
  } else if(mp.size()==2){
    if(n%3==0){
      if(mp[0]==n/3){
        cout << "Yes" << endl;
        return 0;
      }
    }
  } else if(n%3==0 && mp.size()==3) {
    vector<int> v,cnt;
    for(auto itr = mp.begin();++i){
      v.push_back(itr->first);
      cnt.push_back(itr->second);
    }
    if(v[0]^v[1]^v[1]&&c[0]==n/3&&c[1]==n/3&&c[2]==n/3){
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No"<< endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:33: error: 'i' was not declared in this scope
   33 |     for(auto itr = mp.begin();++i){
      |                                 ^
a.cc:33:34: error: expected ';' before ')' token
   33 |     for(auto itr = mp.begin();++i){
      |                                  ^
      |                                  ;
a.cc:37:24: error: 'c' was not declared in this scope
   37 |     if(v[0]^v[1]^v[1]&&c[0]==n/3&&c[1]==n/3&&c[2]==n/3){
      |                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define all(a)  (a).begin(),(a).end()
typedef long long ll;
const ll mod=1000000007;
#define repi(i,a,b) for(ll i=ll(a);i<ll(b);++i)

int main() {
  int n;cin>>n;
  map<int,int> mp;
  for(int i=0;i<n;++i){
    int a;cin>>a;
    if(mp.find(a)!= mp.end()){
      mp[a] +=1;
    } else {
      mp[a] =1;
    }
  }
  if(mp.size()==1){
    if(mp.begin()->first==0){
      cout << "Yes" << endl;
      return 0;
    }
  } else if(n%3==0 && mp.size()==2){
    if(v[0]==0&&mp[v[0]]==n/3){
        cout << "Yes" << endl;
        return 0;
    }
  } else if(n%3==0 && mp.size()==3) {
    vector<int> v,cnt;
    for(auto itr = mp.begin();++i){
      v.push_back(itr->first);
      cnt.push_back(itr->second);
    }
    if(v[0]^v[1]^v[1]&&c[0]==n/3&&c[1]==n/3&&c[2]==n/3){
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No"<< endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:8: error: 'v' was not declared in this scope
   25 |     if(v[0]==0&&mp[v[0]]==n/3){
      |        ^
a.cc:31:33: error: 'i' was not declared in this scope
   31 |     for(auto itr = mp.begin();++i){
      |                                 ^
a.cc:31:34: error: expected ';' before ')' token
   31 |     for(auto itr = mp.begin();++i){
      |                                  ^
      |                                  ;
a.cc:35:24: error: 'c' was not declared in this scope
   35 |     if(v[0]^v[1]^v[1]&&c[0]==n/3&&c[1]==n/3&&c[2]==n/3){
      |                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define all(a)  (a).begin(),(a).end()
typedef long long ll;
const ll mod=1000000007;
#define repi(i,a,b) for(ll i=ll(a);i<ll(b);++i)

int main() {
  int n;cin>>n;
  map<int,int> mp;
  for(int i=0;i<n;++i){
    int a;cin>>a;
    if(mp.find(a)!= mp.end()){
      mp[a] +=1;
    } else {
      mp[a] =1;
    }
  }
  if(n%3==0){
    f(mp.size()==1){
      if(mp.begin()->first==0){
        cout << "Yes" << endl;
        return 0;
      }
    } else if(mp.size()==2){
      auto itr = mp.begin();
      int a1 = itr->first,cnt1 = itr->second;
      ++itr;
      int a2 = itr->first,cnt2 = itr->second;
      if(a1<a2){
        if(a1==0&&cnt1==n/3){
          cout << "Yes" << endl;
          return 0;
        }
      } else {
        if(a2==0&&cnt2==n/3){
          cout << "Yes" << endl;
          return 0;
        }
      }
    } else {
      auto itr = mp.begin();
      int a1 = itr->first,cnt1 = itr->second;
      ++itr;
      int a2 = itr->first,cnt2 = itr->second;
      ++itr;
      int a3 = itr->first,cnt3 = itr->second;
      if(a1^a2^a3==0&&cnt1==n/3&&cnt2==n/3&&cnt3==n/3){
        cout << "Yes" << endl;
        return 0;
      }
    }
  } else {
    if(mp.size()==1){
      if(mp.begin()->first==0){
        cout << "Yes" << endl;
        return 0;
      }
    }
  }
  cout << "No"<< endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'f' was not declared in this scope
   20 |     f(mp.size()==1){
      |     ^
a.cc:25:7: error: expected '}' before 'else'
   25 |     } else if(mp.size()==2){
      |       ^~~~
a.cc:19:13: note: to match this '{'
   19 |   if(n%3==0){
      |             ^
a.cc: At global scope:
a.cc:53:5: error: expected unqualified-id before 'else'
   53 |   } else {
      |     ^~~~
a.cc:61:3: error: 'cout' does not name a type
   61 |   cout << "No"<< endl;
      |   ^~~~
a.cc:62:3: error: expected unqualified-id before 'return'
   62 |   return 0;
      |   ^~~~~~
a.cc:63:1: error: expected declaration before '}' token
   63 | }
      | ^
Language: C++

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

int main(){
    ll n; cin >> n;
    auto a = v(n,0);
    for(auto &i:a) cin >> i;
  	ll c= a[0];
    for(ll i=1;i<n;i++) c^=a[i];
  	cout << (c==x[0]?"Yes":"No");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'x' was not declared in this scope
   12 |         cout << (c==x[0]?"Yes":"No");
      |                     ^
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
int nx[4]={0,1,-1,0};
int ny[4]={1,0,0,-1};
int main(){
  ll n;
  cin>>n;
  vll a(n);
  rep(i,n) cin>>a[i];
  sort(all(a));
  ll k=1;
  vll d(3);
  ll h=0;
  rep(i,n-1){
    d[h]++;
    if(a[i]!=a[i+1]){
      k++;
      h++;
    }
  }
  if(k==3){
    d[2]++;
  }
  if(k!=3){ 
    COUT("No");
    return 0;
  }
  ll j=0;
  rep(i,2){
    if(d[i]!=d[i+1]) j++;
  }
  else if(j){
    COUT("No");
    return 0;
  }
  else{
    COUT("Yes");
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:3: error: 'else' without a previous 'if'
   67 |   else if(j){
      |   ^~~~
Language: C++

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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll n,a; cin >> n;
  map<ll,ll> m;
  for (ll i = 0; i < n; ++i) {
    cin >> a; m[a] += 1;
  }
  if (m.size() == 1) {
    if (m.begin()->first == 0) puts("Yes"); else puts("No");
  }
  else if (m.size() == 2) {
    if (m.begin()->first == 0 && n%3 == 0 && m.begin()->second == n/3)
      puts("Yes"); else puts("No");
  }
  else if (m.size() == 3) {
    vector<ll> keys(3); ll pos = 0, xor = 0;
    for (auto itr = m.begin(); itr != m.end(); ++itr) { 
      keys[pos] = itr->first; pos += 1;
      xor ^= itr->first;
    }
    bool b1 = (xor == 0);
    bool b2 = (m[keys[0]] == m[keys[1]] && m[keys[1]] == m[keys[2]]);
    if (b1&&b2) puts("Yes"); else puts("No");
  }
  else puts("No");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:37: error: expected unqualified-id before 'xor' token
   21 |     vector<ll> keys(3); ll pos = 0, xor = 0;
      |                                     ^~~
a.cc:24:7: error: expected primary-expression before 'xor' token
   24 |       xor ^= itr->first;
      |       ^~~
a.cc:24:11: error: expected primary-expression before '^=' token
   24 |       xor ^= itr->first;
      |           ^~
a.cc:26:16: error: expected primary-expression before 'xor' token
   26 |     bool b1 = (xor == 0);
      |                ^~~
a.cc:26:20: error: expected primary-expression before '==' token
   26 |     bool b1 = (xor == 0);
      |                    ^~
Language: C++

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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll n,a; cin >> n;
  map<ll,ll> m;
  for (ll i = 0; i < n; ++i) {
    cin >> a; m[a] += 1;
  }
  if (m.size() == 1) {
    if (m.begin()->first == 0) puts("Yes"); else puts("No");
  }
  else if (m.size() == 2) {
    if (m.begin()->first == 0 && N%3 == 0 && m.begin()->second == N/3)
      puts("Yes"); else puts("No");
  }
  else if (m.size() == 3) {
    vector<ll> keys(3); ll pos = 0;
    for (auto itr = m.begin(); itr != m.end(); ++itr) { 
      keys[pos] = itr->first; pos += 1;
    }
    if (m[keys[0]] == m[keys[1]] && m[keys[1]] == m[keys[2]])
      puts("Yes"); else puts("No");
  }
  else puts("No");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:34: error: 'N' was not declared in this scope
   17 |     if (m.begin()->first == 0 && N%3 == 0 && m.begin()->second == N/3)
      |                                  ^
Language: C++

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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll n,a; cin >> n;
  map<ll,ll> m;
  for (ll i = 0; i < n; ++i) {
    cin >> a; m[a] += 1;
  }
  if (m.size() == 1) {
    if (*m.begin()->first == 0) puts("Yes"); else puts("No");
  }
  else if (m.size() == 2) {
    if (*m.begin()->first == 0 && N%3 == 0 && *m.begin()->second == N/3)
      puts("Yes"); else puts("No");
  }
  else if (m.size() == 3) {
    vector<ll> keys(3); ll pos = 0;
    for (auto itr = m.begin(); itr != m.end(); ++itr) { 
      keys[pos] = itr->first; pos += 1;
    }
    if (m[keys[0]] == m[keys[1]] && m[keys[1]] == m[keys[2]])
      puts("Yes"); else puts("No");
  }
  else puts("No");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: invalid type argument of unary '*' (have 'long long int')
   14 |     if (*m.begin()->first == 0) puts("Yes"); else puts("No");
      |         ^~~~~~~~~~~~~~~~~
a.cc:17:9: error: invalid type argument of unary '*' (have 'long long int')
   17 |     if (*m.begin()->first == 0 && N%3 == 0 && *m.begin()->second == N/3)
      |         ^~~~~~~~~~~~~~~~~
a.cc:17:35: error: 'N' was not declared in this scope
   17 |     if (*m.begin()->first == 0 && N%3 == 0 && *m.begin()->second == N/3)
      |                                   ^
a.cc:17:47: error: invalid type argument of unary '*' (have 'long long int')
   17 |     if (*m.begin()->first == 0 && N%3 == 0 && *m.begin()->second == N/3)
      |                                               ^~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
map<ll,ll> m;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n;
    cin>>n;
    for(ll i=0;i<n;i++){
        ll x;
        cin>>x;
        if(m.find(x)==m.end())
        m.insert({x,0});
        m[x]++;
    }
    ll a=m.begin()->first,c=prev(m.end(),1)->first;
    if(a==0&&m[a]==n)
    cout<<"Yes";
    else if(n%3==0){
        if(m.size()==2){
            if(a==0&&m[a]==n/3&&m[c]==2*n/3)
            cout<<"Yes";
            else
            cout<<"No";
        }
        else if(m.size()==3){
            b=next(m.begin(),1)->first;
            if((a^b^c==0)&&m[a]==n/3&&m[b]==n/3&&m[c]==n/3)
            cout<<"Yes";
            else
            cout<<"No";
        }
    }
    else
    cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: 'b' was not declared in this scope
   29 |             b=next(m.begin(),1)->first;
      |             ^
Language: C++

#pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e6 + 5;
int n;
int z[N];
unordered_map <int, int> mp;
int main()
{
    scanf("%d", &n);
    for (int i = 0; i < n; ++i)
        scanf("%d", z + i);
    int c = 0;
    for (int i = 0; i < n; ++i)
    {
        if (mp[z[i]] == 0)
            ++c;
        ++mp[z[i]];
    }
    if (c == 1)
    {
        if (z[0] == 0)
            puts("Yes");
        else
            puts("No");
        return 0;
    }
    if (n % 3 != 0)
    {
        puts("No");
        return 0;
    }
    if (c != 3)
    {
        if (c == 2 && mp[0] = n / 3)
        {
            puts("Yes");
            return 0;
        }
        puts("No");
        return 0;
    }
    int f = 1;
    int ans = 0;
    for (int i = 0; i < n; ++i)
    {
        if (mp[z[i]] == 0)
            continue;
        ans ^= z[i];
        if (mp[z[i]] != n / 3)
            f = 0;
    }
    if (!f || ans != 0)
        puts("No");
    else
        puts("Yes");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:20: error: lvalue required as left operand of assignment
   36 |         if (c == 2 && mp[0] = n / 3)
Language: C++

39
44 0 44 44 44 44 44 0 44 0 44 0 0 44 44 44 44 0 44 44 44 44 0 44 0 44 0 44 44 44 0 0 44 0 44 44 0 44 44

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 39
      | ^~
Language: C++

#include <iostream>
int main(void)
{
  cout<<"Yes";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: 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: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
#define M 1000000007
int main(){
  int n;
  cin>>n;
  if(n!=3){
    cout<<"No";
    return 0;
  }
  cin>>a>>b>>c;
  if(a^b==c)cout<<"Yes";
  else cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'a' was not declared in this scope
   13 |   cin>>a>>b>>c;
      |        ^
a.cc:13:11: error: 'b' was not declared in this scope
   13 |   cin>>a>>b>>c;
      |           ^
a.cc:13:14: error: 'c' was not declared in this scope
   13 |   cin>>a>>b>>c;
      |              ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define range(i, m, n) for(int i = m; i < n; i++)
#define husk(i, m, n) for(int i = m; i > n; i--)

int n;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  map<int, int> a;
  range(i, 0, n) {
    int x;
    cin >> x;
    a[x]++;
  }
  int sz = a.size();
  if(sz > 3) {
    cout << "No";
    return 0;
  }
  if(sz == 1) {
    if(a.begin()->first) {
      cout << "No";
      return 0;
    } 
  }
  if(sz == 2) {
    int x = a.begin()->first, sx = a[x];
    int y = next(a.begin())->first, sy = a[y];
    if(x || sy != 2 * sx) {
      cout << "No";
      return 0;
    }
  }
  if(sz == 3) {
    int cur = 0;
    for(auto it : a) {
      cur ^= it->first;
      if(it.second != a.begin()->second) {
        cout << "No";
        return 0;
      }
    }
    if(cur) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:16: error: base operand of '->' has non-pointer type 'std::pair<const int, int>'
   43 |       cur ^= it->first;
      |                ^~
Language: C++

#include <bits/stdc++.h>

int main() {
	int number;
	std::cin >> number;
	int anArray[number] = {};

	for(int i = 0; i < number; i++){
		std::cin >> anArray[i];
	}

	for(int j = 0; j < number; j++){
		if(j == 0){
			int checkNumber = anArray[j+1] ^ anArray[number-1];
			if(anArray[j] != checkNumber) {std::cout << "No" << std::endl;}
		}else if (j == number-1){
			int checkNumber = anArray[j-2] ^ anArray[j-1];
			if(anArray[j] != checkNumber) {std::cout << "No" << std::endl;}
		}else {
			int checkNumber = anArray[j-1] ^ anArray[j+1];
			if(anArray[j] != checkNumber) {std::cout << "No" << std::endl;}
		}
	}

	std::cout << "Yes" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |         std::cout << "Yes" << endl;
      |                               ^~~~
      |                               std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/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>

int main() {
	int number;
	std::cin >> number;
	int anArray[number] = {};

	for(int i = 0; i < number; i++){
		std::cin >> anArray[i];
	}

	for(int j = 0; j < number; j++){
		if(j == 0){
			int checkNumber = anArray[j+1] ^ anArray[number-1];
			if(anArray[j] != checkNumber) {std::cout << "No" << endl;}
		}else if (j == number-1){
			int checkNumber = anArray[j-2] ^ anArray[j-1];
			if(anArray[j] != checkNumber) {std::cout << "No" << endl;}
		}else {
			int checkNumber = anArray[j-1] ^ anArray[j+1];
			if(anArray[j] != checkNumber) {std::cout << "No" << endl;}
		}
	}

	std::cout << "Yes" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:77: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |                         if(anArray[j] != checkNumber) {std::cout << "No" << endl;}
      |                                                                             ^~~~
      |                                                                             std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:18:77: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |                         if(anArray[j] != checkNumber) {std::cout << "No" << endl;}
      |                                                                             ^~~~
      |                                                                             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:21:77: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 |                         if(anArray[j] != checkNumber) {std::cout << "No" << endl;}
      |                                                                             ^~~~
      |                                                                             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:25:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |         std::cout << "Yes" << endl;
      |                               ^~~~
      |                               std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.List;
import java.util.ArrayList;

public class Main {
	public static void main(String[] arguments) {
		Test.check(arguments);
		Integer number = Integer.valueOf(arguments[0]);

		int[] anArray = new int[number];

		for(Integer i = 0; i < number; i++) {
			anArray[i] = Integer.valueOf(arguments[i+1]);
		}
		
		for(Integer j = 0; j < number; j++){
			if(j == 0){
				int checkNumber = anArray[j+1] ^ anArray[number-1];
				if(anArray[j] != checkNumber) {System.out.println("No"); System.exit(0);;}
			}else if (j == number-1){
				int checkNumber = anArray[j-2] ^ anArray[j-1];
				if(anArray[j] != checkNumber) {System.out.println("No"); System.exit(0);;}
			}else {
				int checkNumber = anArray[j-1] ^ anArray[j+1];
				if(anArray[j] != checkNumber) {System.out.println("No");System.exit(0);;}
			}
		}
		System.out.println("Yes");
		return;
	}
	private static void check(String[] arguments){
		if(Integer.valueOf(arguments[0]) < 3) {
			System.out.println("正しい値を入力してください");
			System.exit(0);
		}else if(Integer.valueOf(arguments[arguments.length-1]) > 10*10*10*10*10) {
			System.out.println("正しい値を入力してください");
			System.exit(0);
		}
		return;
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		Test.check(arguments);
		^
  symbol:   variable Test
  location: class Main
1 error
Language: Java

import java.util.List;
import java.util.ArrayList;

public class Test {
	public static void main(String[] arguments) {
		Test.check(arguments);
		Integer number = Integer.valueOf(arguments[0]);

		int[] anArray = new int[number];

		for(Integer i = 0; i < number; i++) {
			anArray[i] = Integer.valueOf(arguments[i+1]);
		}
		
		for(Integer j = 0; j < number; j++){
			if(j == 0){
				int checkNumber = anArray[j+1] ^ anArray[number-1];
				if(anArray[j] != checkNumber) {System.out.println("No"); System.exit(0);;}
			}else if (j == number-1){
				int checkNumber = anArray[j-2] ^ anArray[j-1];
				if(anArray[j] != checkNumber) {System.out.println("No"); System.exit(0);;}
			}else {
				int checkNumber = anArray[j-1] ^ anArray[j+1];
				if(anArray[j] != checkNumber) {System.out.println("No");System.exit(0);;}
			}
		}
		System.out.println("Yes");
		return;
	}
	private static void check(String[] arguments){
		if(Integer.valueOf(arguments[0]) < 3) {
			System.out.println("正しい値を入力してください");
			System.exit(0);
		}else if(Integer.valueOf(arguments[arguments.length-1]) > 10*10*10*10*10) {
			System.out.println("正しい値を入力してください");
			System.exit(0);
		}
		return;
	}
}

Compiler output:
Main.java:4: error: class Test is public, should be declared in a file named Test.java
public class Test {
       ^
1 error
Language: C++

//#pragma GCC optimize(2)
//#pragma GCC optimize(3)
#include<bits/stdc++.h>
//#include <bits/extc++.h>
#define fi first
#define se second
#define db double
#define mp make_pair
#define pb push_back
#define mt make_tuple
//#define pi acos(-1.0)
#define ll long long
#define vi vector<int>
#define mod 1000000007
#define ld long double
#define ls l,m,rt<<1
#define rs m+1,r,rt<<1|1
#define pll pair<ll,ll>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define pii pair<int,int>
#define ull unsigned long long
#define bpc __builtin_popcount
#define base 1000000000000000000ll
#define fin freopen("a.txt","r",stdin)
#define fout freopen("a.txt","w",stdout)
#define mr mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
inline ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
inline void sub(ll &a,ll b){a-=b;if(a<0)a+=mod;}
inline void add(ll &a,ll b){a+=b;if(a>=mod)a-=mod;}
inline ll mul(ll a,ll b,ll c){return (a*b-(ll)((ld)a*b/c)*c+c)%c;}
inline ll qp(ll a,ll b){ll ans=1;while(b){if(b&1)ans=ans*a%mod;a=a*a%mod,b>>=1;}return ans;}
inline ll qp(ll a,ll b,ll c){ll ans=1;while(b){if(b&1)ans=mul(ans,a,c);a=mul(a,a,c),b>>=1;}return ans;}

using namespace std;
//using namespace __gnu_pbds;

const ld pi = acos(-1);
const ull ba=233;
const db eps=1e-5;
const ll INF=0x3f3f3f3f3f3f3f3f;
const int N=16000+10,maxn=2000000+10,inf=0x3f3f3f3f;

map<int,int>ma;
int main()
{
    int n;scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        int x;scanf("%d",&x);
        ma[x]++;
    }
    if(ma.size()==1)return 0*puts(ma.begin()->fi?"No":"Yes");
    if(ma.size()==2)
    {
        if(ma.begin()->fi!=0)return 0*puts("No");
        if((--ma.end())->se)-ma.begin()->se>1||(--ma.end())->se)-ma.begin()->se<0)return 0*puts("No");
//        puts("___");
        return 0*puts("Yes");
    }
    if(n%3!=0||ma.size()>3)puts("No");
    else
    {
        auto te=ma.begin();
        int x=te->fi;
        if(te->se!=n/3)return 0*puts("No");
        te++;
        int y=te->fi;
        if(te->se!=n/3)return 0*puts("No");
        te++;
        int z=te->fi;
        if(te->se!=n/3)return 0*puts("No");
        puts(((x^y)==z)?"Yes":"No");
    }
    return 0;
}
/********************
5
1 0 1 0 2
********************/


Compiler output:
a.cc: In function 'int main()':
a.cc:57:64: error: expected ';' before ')' token
   57 |         if((--ma.end())->se)-ma.begin()->se>1||(--ma.end())->se)-ma.begin()->se<0)return 0*puts("No");
      |                                                                ^
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <utility>
#include <tuple>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cmath>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

#define cin in
int main() {
  int N;
  cin >> N;
  map<int, int> mp;
  rep(i, N) {
    int tmp;
    cin >> tmp;
    mp[tmp]++;
  }
  if (mp.size() > 3)
    cout << "No" << endl;
  else if (mp.size() == 3 && !(N%3)) {
    for (auto e : mp) {
      if (e.second != N/3) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
  } else if (mp.size() == 2 && !(N%3)) {
    for (auto e : mp) {
      if (e.second%(N/3)) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
  } else {
    if (mp[0] == mp.size())
      cout << "Yes" << endl;
    else
      cout << "No" << endl; 
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: 'in' was not declared in this scope; did you mean 'yn'?
   22 | #define cin in
      |             ^~
a.cc:25:3: note: in expansion of macro 'cin'
   25 |   cin >> N;
      |   ^~~
Language: C++

#include <bits/stdc++.h>
#define l_ength size
const int inf = (1<<30);
const int mod = 1000000007;
using ll = long long;
using namespace std;

int main(){
	int n; cin >> n;
	vector<int> a(n);
	for( auto &k : a ) cin >> k;
	int x = a[0]
	for( int i = 1; i < n; ++i ){
		x ^= a[i];
	}
	if( x == 0 ) cout << "Yes";
	else cout << "No";
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ',' or ';' before 'for'
   13 |         for( int i = 1; i < n; ++i ){
      |         ^~~
a.cc:13:25: error: 'i' was not declared in this scope
   13 |         for( int i = 1; i < n; ++i ){
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
typedef long long ll;
typedef pair<int,int> P;
using vi=vector<int>;
using vvi=vector<vector<int>>;
using vc=vector<char>;
using vvc=vector<vector<char>>;
const int inf=1000000009;
void chmin(auto &a,auto b){if(b<a)a=b;}
void chmax(auto &a,auto b){if(a<b)a=b;}

int main(){
  int n;cin>>n;
  if(n%3!=0){
    rep(i,n){
      int a;cin>>a;
      if(a){
        cout<<"No"<<endl;
      return 0;}
    }
    cout<<"Yes"<<endl;
  }
  else{
    vi v(3);
    rep(i,n){
      rep(j,3){
        
}


Compiler output:
a.cc:11:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   11 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |            ^~~~
a.cc:11:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   11 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |                    ^~~~
a.cc:12:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   12 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |            ^~~~
a.cc:12:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   12 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:27:13: note: to match this '{'
   27 |     rep(i,n){
      |             ^
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:25:7: note: to match this '{'
   25 |   else{
      |       ^
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:14:11: note: to match this '{'
   14 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <limits>
#include <queue>
#include <map> 
using namespace std;

#define LL long long


int main()
{
	LL N;
	cin >> N;

	LL num;
	map<LL, LL> mp;

	for (LL i = 0; i < N; i++) {
		//cin >> num;
		scanf_s("%lld", &num);
		mp[num]++;
	}

	LL size = mp.size();
	if (size == 1) {
		if (mp[0] == N) {
			cout << "Yes" << endl;
			return 0;
		}
	}
	
	if (N % 3 != 0) {
		cout << "No" << endl;
		return 0;
	}

	if (size == 2) {
		if (mp[0] == (N / 3)) {
			cout << "Yes" << endl;
			return 0;
		}
	}
	else if (size == 3) {
		// first: key, second: value
		auto iter = mp.begin();
		LL key1 = iter->first;
		LL val1 = iter->second;

		iter++;
		LL key2 = iter->first;
		LL val2 = iter->second;

		iter++;
		LL key3 = iter->first;
		LL val3 = iter->second;

		if (val1 == val2 && val2 == val3) {
			if ((key1 ^ key2) == key3) {
				cout << "Yes" << endl;
				return 0;
			}
		}
	}

	cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   25 |                 scanf_s("%lld", &num);
      |                 ^~~~~~~
      |                 scanf
Language: C

#include <stdio.h>

int main(void){
  long i,j;

  long n;
  scanf("%ld",&n);

  long a;
  if(n%3){
    for(i = 0; i < n; i++){
      scanf("%ld", &a);
      if(a){
        printf("No\n");
        return 0;
      }
    }
    printf("Yes\n");
    return 0;
  }

  long a,index_no[3]={-1,-1,-1},index[3]={0,0,0};
  for(i=0;i<n;i++){
    scanf("%ld",&a);
    if(index_no[0]==-1){
      index_no[0]=a;
      index[0]++;
    }else if(a==index_no[0]){
      index[0]++;
    }else if(index_no[1]==-1){
      index_no[1]=a;
      index[1]++;
    }else if(a==index_no[1]){
      index[1]++;
    }else if(index_no[2]==-1){
      index_no[2]=a;
      index[2]++;
    }else if(a==index_no[2]){
      index[2]++;
    }else{
      printf("No\n");
      return 0;
    }
  }

  if(((index_no[0]==0&&index[0]*2==index[1])||(index_no[1]==0&&index[1]*2==index[0]))&&index_no[2]==-1){
    printf("Yes\n");
  }else if(index_no[0]==0&&index[0]==n){
    printf("Yes\n");
  }else if(index[0]!=index[1]||index[1]!=index[2]){
    printf("No\n");
  }else if(index_no[0]!=(index_no[1]^index_no[2])){
    printf("No\n");
  }else{
    printf("Yes\n");
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:22:8: error: redeclaration of 'a' with no linkage
   22 |   long a,index_no[3]={-1,-1,-1},index[3]={0,0,0};
      |        ^
main.c:9:8: note: previous declaration of 'a' with type 'long int'
    9 |   long a;
      |        ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

bool exists(int x, vector<int> &v){
  for(int e : v){
    if(e == x) return true;
  }
  return false;
}

int main(){
  int n;
  cin >> n;
  
  priority_queue<int> a;
  for(int i = 0; i < n; i++){
    int in;
    cin >> in;
    a.push(in);
  }
  
  bool result = false;
  if(a.top() == 0){
    result = true;
  }else if(n % 3 == 0){
    int t = a.top();
    for(int i = 0; i < n / 3 - 1; i++) a.pop();
    int b = a.top();
    a.pop();
    if(t == b){
      t = a.top();
      if(t != 0){
        for(int i = 0; i < n / 3 - 1; i++) a.pop();
        b = a.top();
        b.pop();
        if(t == b){
          t = a.top();
          for(int i = 0; i < n / 3 - 1; i++) a.pop();
          b = a.top();
          if(t == b) result = true;
        }
      }
    }
  }
  
  cout << (result ? "Yes" : "No") << '\n';
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:11: error: request for member 'pop' in 'b', which is of non-class type 'int'
   36 |         b.pop();
      |           ^~~
Language: Java

import java.util.*;

public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int[] a = new int[N];
        Map<Integer, Integer> map = new HashMap<>();
        for(int i = 0; i < N; i++){
            a[i] = sc.nextInt();
            if(map.containsKey(a[i]))
                map.put(a[i], map.get(a[i])+1);
            else
                map.put(a[i], 1);
        }
        sc.close();

        if(map.size() == 1 && a[0] == 0){
            System.out.println("Yes");
            return;
        }
        if(N % 3 == 0){
        if(map.size() == 2){
            int count = 0;
            int x = 0;
            for(Integer key: map.keySet()){
                if(key == 0){
                    if(map.get(key) == N/3)
                        count++;
                } else {
                    if(map.get(key) == 2*N/3){
                        if(x == 0){
                            count++;
                        }
                        x++;
                    }
                }
            }
            if(count == 2){
                System.out.println("Yes");
                return;
            }
        }

        if(map.size() == 3){
            int cnt = 0;
            int sum = 0;
            for(Integer key: map.keySet()){
                sum ^= key;
                if(map.get(key) == N/3)
                    cnt++;
            }
            if(cnt == 3 && key == 0){
                System.out.println("Yes");
                return;
            }
        }
        }

        System.out.println("No");

    }
}

Compiler output:
Main.java:55: error: cannot find symbol
            if(cnt == 3 && key == 0){
                           ^
  symbol:   variable key
  location: class Main
1 error
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) cout<<"Yes"<<endl;
  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:35:10: error: 'mt' was not declared in this scope; did you mean 'it'?
   35 |     for(;mt!=M.end();mt++){
      |          ^~
      |          it
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) cout<<"Yes"<<endl;
  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) cout<<"Yes"<<endl;
a.cc:35:10: error: 'mt' was not declared in this scope; did you mean 'it'?
   35 |     for(;mt!=M.end();mt++){
      |          ^~
      |          it