Language: C++

#include <bits/stdc++.h>

int main() {
	int number; cin >> number;
	int anAray[number] = {};

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

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

	cout << "Yes" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:21: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |         int number; cin >> number;
      |                     ^~~
      |                     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:43: error: 'anArray' was not declared in this scope; did you mean 'anAray'?
   13 |                         int checkNumber = anArray[j+1] ^ anArray[number-1];
      |                                           ^~~~~~~
      |                                           anAray
a.cc:14:56: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |                         if(anArray[j] != checkNumber) {cout << "No" << endl;}
      |                                                        ^~~~
      |                                                        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:72: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |                         if(anArray[j] != checkNumber) {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:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:16:43: error: 'anArray' was not declared in this scope; did you mean 'anAray'?
   16 |                         int checkNumber = anArray[j-2] ^ anArray[j-1];
      |                                           ^~~~~~~
      |                                           anAray
a.cc:17:56: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |                         if(anArray[j] != checkNumber) {cout << "No" << endl;}
      |                                                        ^~~~
      |                                                        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:72: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |                         if(anArray[j] != checkNumber) {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:19:43: error: 'anArray' was not declared in this scope; did you mean 'anAray'?
   19 |                         int checkNumber = anArray[j-1] ^ anArray[j+1];
      |                                           ^~~~~~~
      |                                           anAray
a.cc:20:56: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |                         if(anArray[j] != checkNumber) {cout << "No" << endl;}
      |                                                        ^~~~
      |                                                        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:72: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |                         if(anArray[j] != checkNumber) {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:24:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |         cout << "Yes" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |         cout << "Yes" << endl;
      |                          ^~~~
      |                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~