Language: C++

v#include "bits/stdc++.h"
 
typedef long long ll;
#define int ll
#define fi first
#define se second
#define SORT(a) sort(a.begin(),a.end())
#define rep(i,n) for(int i = 0;i < (n) ; i++) 
#define REP(i,n) for(int i = 0;i < (n) ; i++) 
#define MP(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define INF LLONG_MAX/2
#define all(x) (x).begin(),(x).end()
#define debug(x) cerr<<#x<<": "<<x<<endl
#define debug_vec(v) cerr<<#v<<":";rep(i,v.size())cerr<<" "<<v[i];cerr<<endl
using namespace std;
int MOD = 1000000007;

signed main(){
    int n;
    cin >> n;
    vector<int> a(n);
    map<int,int> m;
    rep(i,n){
        int a;
        cin >> a;
        m[a]++;
    }
    auto itr = m.find(0);
    if(itr != m.end()){
        if(m[0] == n){
            cout << "Yes" << endl;
        }else cout << "No" << endl;
    }else{
        if(m.size() != 3){
            cout << "No" << endl;
        }else{
            int val[2][3];
            int i = 0;
            for(auto x:m){
                val[0][i] = x.fi;
                val[1][i] = x.se;
                i++;
            }
            if(val[1][0] == val[1][1] && val[1][0] == val[1][2]
                && (val[0][0]^val[0][2]) == val[0][1]
                && (val[0][1]^val[0][0]) == val[0][2]
                && (val[0][2]^val[0][1]) == val[0][0]){
                    cout << "Yes" << endl;
            }else{
                cout << "No" << endl;
            }
        }
    }

    
    
    return 0;
}

// g++ -std=c++14 code1.cpp
// rm -r -f test;oj dl https://cf17-final-open.contest.atcoder.jp/tasks/cf17_final_a
// rm -r -f test;oj dl http://agc035.contest.atcoder.jp/tasks/agc035_a

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include "bits/stdc++.h"
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include "bits/stdc++.h"
      | ^
a.cc:4:13: error: 'll' does not name a type; did you mean 'all'?
    4 | #define int ll
      |             ^~
a.cc:17:1: note: in expansion of macro 'int'
   17 | int MOD = 1000000007;
      | ^~~
a.cc: In function 'int main()':
a.cc:4:13: error: 'll' was not declared in this scope; did you mean 'all'?
    4 | #define int ll
      |             ^~
a.cc:20:5: note: in expansion of macro 'int'
   20 |     int n;
      |     ^~~
a.cc:21:5: error: 'cin' was not declared in this scope
   21 |     cin >> n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | v#include "bits/stdc++.h"
a.cc:21:12: error: 'n' was not declared in this scope
   21 |     cin >> n;
      |            ^
a.cc:22:5: error: 'vector' was not declared in this scope
   22 |     vector<int> a(n);
      |     ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | v#include "bits/stdc++.h"
a.cc:22:17: error: 'a' was not declared in this scope
   22 |     vector<int> a(n);
      |                 ^
a.cc:23:5: error: 'map' was not declared in this scope
   23 |     map<int,int> m;
      |     ^~~
a.cc:1:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
  +++ |+#include <map>
    1 | v#include "bits/stdc++.h"
a.cc:23:18: error: 'm' was not declared in this scope
   23 |     map<int,int> m;
      |                  ^
a.cc:24:9: error: expected ';' before 'i'
   24 |     rep(i,n){
      |         ^
a.cc:8:26: note: in definition of macro 'rep'
    8 | #define rep(i,n) for(int i = 0;i < (n) ; i++)
      |                          ^
a.cc:24:9: error: 'i' was not declared in this scope; did you mean 'fi'?
   24 |     rep(i,n){
      |         ^
a.cc:8:32: note: in definition of macro 'rep'
    8 | #define rep(i,n) for(int i = 0;i < (n) ; i++)
      |                                ^
a.cc:25:13: error: expected ';' before 'a'
   25 |         int a;
      |             ^
a.cc:32:13: error: 'cout' was not declared in this scope
   32 |             cout << "Yes" << endl;
      |             ^~~~
a.cc:32:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:30: error: 'endl' was not declared in this scope
   32 |             cout << "Yes" << endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | v#include "bits/stdc++.h"
a.cc:33:15: error: 'cout' was not declared in this scope
   33 |         }else cout << "No" << endl;
      |               ^~~~
a.cc:33:15: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:31: error: 'endl' was not declared in this scope
   33 |         }else cout << "No" << endl;
      |                               ^~~~
a.cc:33:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:36:13: error: 'cout' was not declared in this scope
   36 |             cout << "No" << endl;
      |             ^~~~
a.cc:36:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:29: error: 'endl' was not declared in this scope
   36 |             cout << "No" << endl;
      |                             ^~~~
a.cc:36:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:38:17: error: expected ';' before 'val'
   38 |             int val[2][3];
      |                 ^~~
a.cc:39:17: error: expected ';' before 'i'
   39 |             int i = 0;
      |                 ^
a.cc:41:17: error: 'val' was not declared in this scope
   41 |                 val[0][i] = x.fi;
      |                 ^~~
a.cc:41:24: error: 'i' was not declared in this scope; did you mean 'fi'?
   41 |                 val[0][i] = x.fi;
      |                        ^
      |                        fi
a.cc:45:16: error: 'val' was not declared in this scope
   45 |             if(val[1][0] == val[1][1] && val[1][0] == val[1][2]
      |                ^~~
a.cc:49:21: error: 'cout' was not declared in this scope
   49 |                     cout << "Yes" << endl;
      |                     ^~~~
a.cc:49:21: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:49:38: error: 'endl' was not declared in this scope
   49 |                     cout << "Yes" << endl;
      |                                      ^~~~
a.cc:49:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:51:17: error: 'cout' was not declared in this scope
   51 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:51:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:51:33: error: 'endl' was not declared in this scope
   51 |                 cout << "No" << endl;
      |                                 ^~~~
a.cc:51:33: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'