# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1146459 | Nurislam | XOR Sum (info1cup17_xorsum) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
//#define int long long
typedef long long ll;
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);
int n;
cin >> n;
vector<int> a(n);
for(int &i : a)cin >> i;
ll ans = 0;
for(int i = 0; i < n; i++){
for(int j = 0; j <= i; j++){
ans ^= (a[i] + a[j])
}
}
cout << ans << '\n';
};