제출 #1088207

#제출 시각아이디문제언어결과실행 시간메모리
1088207vahagngXOR Sum (info1cup17_xorsum)C++17
7 / 100
1635 ms12684 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(v) v.begin(),v.end()
#define endl '\n'

const int N = 1e6 + 10;

ll n, a[N], ans;

void solve(){
    cin >> n;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    for(int i = 1; i <= n; i++){
        for(int j = i; j <= n; j++){
            ans ^= (a[i] + a[j]);
        }
    }
    cout << ans << endl;
}

int main(){
    int t = 1;
    // cin >> t;
    while(t--){
        solve();
    }
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...