Language: C++

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

int main()
{
  long long int N;
  cin >> N;
  vector<long long int> a(N);
  for (int i = 0; i < N; i++)
  {
    cin >> a.at(i);
  }
  bool can = false;
  map<long long, long long> mp;
  for (int i = 0; i < N; i++)
    mp[a[i]]++;
  sort(a.begin(), a.end());
  a.erase(unique(a.begin(), a.end()), a.end());
  if (mp.size() == 1 && a[0] == 0)
    can = true;
  if (mp.size() == 2)
  {
    if (n % 3 == 0 && a[0] == 0 && mp[a[0]] == n / 3)
      can = true;
  }
  if (n % 3 == 0 && mp[a[0]] == n / 3 && mp[a[1]] == n / 3 && mp[a[2]] == n / 3 && (a[0] ^ a[1] ^ a[2]) == 0)
    can = true;
  if (can)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<long long int> a(N);
      |   ^~~~~~
a.cc:8:10: error: expected primary-expression before 'long'
    8 |   vector<long long int> a(N);
      |          ^~~~
a.cc:11:12: error: 'a' was not declared in this scope
   11 |     cin >> a.at(i);
      |            ^
a.cc:14:3: error: 'map' was not declared in this scope
   14 |   map<long long, long long> mp;
      |   ^~~
a.cc:14:7: error: expected primary-expression before 'long'
   14 |   map<long long, long long> mp;
      |       ^~~~
a.cc:16:5: error: 'mp' was not declared in this scope
   16 |     mp[a[i]]++;
      |     ^~
a.cc:16:8: error: 'a' was not declared in this scope
   16 |     mp[a[i]]++;
      |        ^
a.cc:17:8: error: 'a' was not declared in this scope
   17 |   sort(a.begin(), a.end());
      |        ^
a.cc:17:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |   sort(a.begin(), a.end());
      |   ^~~~
      |   short
a.cc:18:11: error: 'unique' was not declared in this scope
   18 |   a.erase(unique(a.begin(), a.end()), a.end());
      |           ^~~~~~
a.cc:19:7: error: 'mp' was not declared in this scope
   19 |   if (mp.size() == 1 && a[0] == 0)
      |       ^~
a.cc:21:7: error: 'mp' was not declared in this scope
   21 |   if (mp.size() == 2)
      |       ^~
a.cc:23:9: error: 'n' was not declared in this scope
   23 |     if (n % 3 == 0 && a[0] == 0 && mp[a[0]] == n / 3)
      |         ^
a.cc:26:7: error: 'n' was not declared in this scope
   26 |   if (n % 3 == 0 && mp[a[0]] == n / 3 && mp[a[1]] == n / 3 && mp[a[2]] == n / 3 && (a[0] ^ a[1] ^ a[2]) == 0)
      |       ^
a.cc:26:21: error: 'mp' was not declared in this scope
   26 |   if (n % 3 == 0 && mp[a[0]] == n / 3 && mp[a[1]] == n / 3 && mp[a[2]] == n / 3 && (a[0] ^ a[1] ^ a[2]) == 0)
      |                     ^~
a.cc:29:5: error: 'cout' was not declared in this scope
   29 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:29:22: error: 'endl' was not declared in this scope
   29 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:31:5: error: 'cout' was not declared in this scope
   31 |     cout << "No" << endl;
      |     ^~~~
a.cc:31:21: error: 'endl' was not declared in this scope
   31 |     cout << "No" << endl;
      |                     ^~~~