Language: C++

int main(){
    int N;
    cin >> N;
    
    vector<int> A(N);
    map<int, int> list;
    
    for(int i = 0; i < N; ++i){
        cin >> A[i];
        list[A[i]]++;
    }
    
    int sp = 0;
    for(auto e : list){
        sp++;
    }
    
    if(sp == 1 && A[0] == 0){
        cout << "Yes" << endl;
        return 0;
    }
    
    if(sp != 3){
        cout << "No" << endl;
        return 0;
    }
    
    vector<int> cnt;
    vector<int> num;
    for(auto e : list){
        num.push_back(e.first);
        cnt.push_back(e.second);
    }
    
    
    if(N % 3 == 0 &&  (num[0] ^ num[1] == num[2])){
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> N;
      |     ^~~
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<int> A(N);
      |     ^~~~~~
a.cc:5:12: error: expected primary-expression before 'int'
    5 |     vector<int> A(N);
      |            ^~~
a.cc:6:5: error: 'map' was not declared in this scope
    6 |     map<int, int> list;
      |     ^~~
a.cc:6:9: error: expected primary-expression before 'int'
    6 |     map<int, int> list;
      |         ^~~
a.cc:9:16: error: 'A' was not declared in this scope
    9 |         cin >> A[i];
      |                ^
a.cc:10:9: error: 'list' was not declared in this scope
   10 |         list[A[i]]++;
      |         ^~~~
a.cc:14:18: error: 'list' was not declared in this scope
   14 |     for(auto e : list){
      |                  ^~~~
a.cc:18:19: error: 'A' was not declared in this scope
   18 |     if(sp == 1 && A[0] == 0){
      |                   ^
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:19:26: error: 'endl' was not declared in this scope
   19 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << "No" << endl;
      |         ^~~~
a.cc:24:25: error: 'endl' was not declared in this scope
   24 |         cout << "No" << endl;
      |                         ^~~~
a.cc:28:12: error: expected primary-expression before 'int'
   28 |     vector<int> cnt;
      |            ^~~
a.cc:29:12: error: expected primary-expression before 'int'
   29 |     vector<int> num;
      |            ^~~
a.cc:30:18: error: 'list' was not declared in this scope
   30 |     for(auto e : list){
      |                  ^~~~
a.cc:31:9: error: 'num' was not declared in this scope; did you mean 'enum'?
   31 |         num.push_back(e.first);
      |         ^~~
      |         enum
a.cc:32:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   32 |         cnt.push_back(e.second);
      |         ^~~
      |         int
a.cc:36:24: error: 'num' was not declared in this scope; did you mean 'enum'?
   36 |     if(N % 3 == 0 &&  (num[0] ^ num[1] == num[2])){
      |                        ^~~
      |                        enum
a.cc:37:9: error: 'cout' was not declared in this scope
   37 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:37:26: error: 'endl' was not declared in this scope
   37 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:39:9: error: 'cout' was not declared in this scope
   39 |         cout << "No" << endl;
      |         ^~~~
a.cc:39:25: error: 'endl' was not declared in this scope
   39 |         cout << "No" << endl;
      |                         ^~~~