fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long n, *x;
  6. cin >> n;
  7. x = new long long[n];
  8. for (int i = 0; i < n; i++)
  9. cin >> x[i];
  10. long res = 0;
  11. for (int i = 0; i < n; i++)
  12. res ^= x[i];
  13. cout << res;
  14. delete []x;
  15. return 0;
  16. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
0