# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
975205 | 2024-05-04T14:47:25 Z | ziewacz | XOR Sum (info1cup17_xorsum) | C++17 | 106 ms | 131072 KB |
#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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 25 ms | 34756 KB | Output is correct |
2 | Correct | 28 ms | 35500 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 106 ms | 131072 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 106 ms | 131072 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 25 ms | 34756 KB | Output is correct |
2 | Correct | 28 ms | 35500 KB | Output is correct |
3 | Runtime error | 62 ms | 131072 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 25 ms | 34756 KB | Output is correct |
2 | Correct | 28 ms | 35500 KB | Output is correct |
3 | Runtime error | 106 ms | 131072 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |