제출 #213601

#제출 시각아이디문제언어결과실행 시간메모리
213601wendy_virgoXOR Sum (info1cup17_xorsum)C++14
7 / 100
1699 ms8952 KiB
#include <bits/stdc++.h> using namespace std; template<typename TH> void _dbg(const char* sdbg, TH h) { cerr << sdbg << " = " << h << "\n"; } template<typename TH, typename... TA> void _dbg(const char* sdbg, TH h, TA... t) { while (*sdbg != ',') cerr << *sdbg++; cerr << " = " << h << ","; _dbg(sdbg + 1, t...); } #define db(...) _dbg(#__VA_ARGS__, __VA_ARGS__) #define chkpt cerr << "--- Checkpoint here ---\n"; const int N=1e6+6; int n,a[N]; void Sub1(){ int ans=0; for(int i=1;i<=n;++i){ for(int j=i;j<=n;++j){ ans^=(a[i]+a[j]); } } cout<<ans; } int main() { // freopen("info1cup17_xorsum.inp","r",stdin); ios_base::sync_with_stdio(0); cin.tie(0); cin>>n; for(int i=1;i<=n;++i){ cin>>a[i]; } Sub1(); 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...