Submission #496848

#TimeUsernameProblemLanguageResultExecution timeMemory
496848AQ0212XOR Sum (info1cup17_xorsum)C++17
7 / 100
1632 ms2620 KiB
#include <iostream> #include <algorithm> #include <cmath> #include <set> #include <map> #include <vector> #include <string> #include <sstream> #include <cstring> #define ll long long int #define pb push_back #define pf push_front #define fi first #define se second #define all(x) x.begin(), x.end() using namespace std; ll ans, a[ 100111 ]; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); ll n; 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; }
#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...