# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
926037 | Zakir060 | XOR Sum (info1cup17_xorsum) | C++17 | 67 ms | 131072 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
void xakir() { /*
int n,m,res=0;
cin>>n>>m;
if(n>=m) {
res=0;
for(int i=2;i<=m;i++) {
res+=(n%i);
}
}
else {
res=(m-n)*n;
for(int i=2;i<=n;i++) {
res+=(n%i);
}
}
cout<<res;
for(int i=1;i<=m;i++) {
cout<<i<<" "<<(n%i)<<endl;
} */
int n;
cin>>n;
vector<int>v(n+1);
for(int i=1;i<=n;i++) {
cin>>v[i];
}
vector<int>pre(n*n+n);
for(int i=1;i<=n;i++) {
for(int j=i;j<=n;j++) {
pre.push_back(v[i]+v[j]);
}
}
int res=0;
for(int i=0;i<pre.size();i++) {
res^=(pre[i]);
}
cout<<res;
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cout.setf( ios::fixed);
cout.precision(4);
system("color 0A");
int t=1;
//cin>>t;
while(t--) {
xakir();
}
/**
░█████╗░░░░░░░░░░░░░░░
██╔══██╗░░██╗░░░░██╗░░
██║░░╚═╝██████╗██████╗
██║░░██╗╚═██╔═╝╚═██╔═╝
╚█████╔╝░░╚═╝░░░░╚═╝░░
░╚════╝░░░░░░░░░░░░░░░
**/
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |