# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
897406 | 2024-01-03T04:05:05 Z | Iwantbemaster | XOR Sum (info1cup17_xorsum) | C++17 | 103 ms | 131072 KB |
#include <bits/stdc++.h> #include <functional> using namespace std; #define int long long #define ff first #define ss second main(){ unsigned long long n; cin >> n; vector<unsigned long long> v(n); for(unsigned long long i = 0; i < n; i++){ cin >> v[i]; } vector<unsigned long long> res; for(unsigned long long i = 0; i < n; i++){ unsigned long long sum = v[i]; for(unsigned long long j = i; j < n; j++){ sum += v[j]; res.push_back(sum); sum = v[i]; } } unsigned long long cur = res[0]; for(unsigned long long i = 1; i < res.size(); i++){ cur = cur ^ res[i]; } cout << cur; } const int fastIO = [](){ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 0; }();
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 51 ms | 68264 KB | Output is correct |
2 | Correct | 34 ms | 66220 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 103 ms | 131072 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 103 ms | 131072 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 51 ms | 68264 KB | Output is correct |
2 | Correct | 34 ms | 66220 KB | Output is correct |
3 | Runtime error | 52 ms | 131072 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 51 ms | 68264 KB | Output is correct |
2 | Correct | 34 ms | 66220 KB | Output is correct |
3 | Runtime error | 103 ms | 131072 KB | Execution killed with signal 9 |
4 | Halted | 0 ms | 0 KB | - |