# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
975205 | ziewacz | XOR Sum (info1cup17_xorsum) | C++17 | 106 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>
#define debug(x...) cerr << "[" #x "]: ", [](auto... $) {((cerr << $ << "; "), ...); }(x), cerr << '\n'
using namespace std;
typedef long long ll;
typedef long double ld;
constexpr int MOD = 1000000007;
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0);
int n;
cin >> n;
vector<int> a(n);
for(int i = 0; i < n; i++) {
cin >> a[i];
}
vector<int> sumy;
for(int i = 0; i < n; i++) {
for(int j = i; j < n; j++) {
sumy.push_back(a[i] + a[j]);
}
}
int ans = sumy[0];
for(int i = 1; i < sumy.size(); i++) {
ans ^= sumy[i];
}
cout << ans;
return 0;
}
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... |