Submission #389317

#TimeUsernameProblemLanguageResultExecution timeMemory
389317wiwihoXOR Sum (info1cup17_xorsum)C++14
7 / 100
1695 ms4172 KiB
#include <bits/stdc++.h> #define mp make_pair #define F first #define S second #define eb emplace_back #define printv(a, b) { \ for(auto pv : a) b << pv << " "; \ b << "\n"; \ } using namespace std; using pii = pair<int, int>; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> v(n + 1); int ans = 0; for(int i = 1; i <= n; i++){ cin >> v[i]; for(int j = 1; j <= i; j++){ ans ^= v[i] + v[j]; } } cout << ans << "\n"; 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...