Submission #497065

#TimeUsernameProblemLanguageResultExecution timeMemory
497065AQ0212XOR Sum (info1cup17_xorsum)C++17
45 / 100
1100 ms2060 KiB
#include <iostream> #include <algorithm> #include <cmath> #include <set> #include <map> #include <vector> #include <string> #include <sstream> #include <cstring> #pragma GCC optimize("inline") #pragma GCC optimize("-fgcse,-fgcse-lm") #pragma GCC optimize("-ftree-pre,-ftree-vrp") #pragma GCC optimize("-ffast-math") #pragma GCC optimize("-fipa-sra") #pragma GCC optimize("-fpeephole2") #pragma GCC optimize("-fsched-spec") #pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") #pragma GCC optimize("unroll-loops") #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...