# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
976820 | 2024-05-07T07:04:02 Z | Isam | XORanges (eJOI19_xoranges) | C++17 | 1000 ms | 3924 KB |
#include<bits/stdc++.h> using namespace std; constexpr int sz = 2e5 + 5; int n, q, a[sz]; signed main(){ ios_base::sync_with_stdio(0), cin.tie(0); cin >> n >> q; for(register int i = 1; i <= n; ++i){ cin >> a[i]; } int type, l, r; while(q--){ cin >> type >> l >> r; if(type == 1){ a[l] = r; }else{ int ans(0); for(register int i = l; i <= r; ++i){ int x = ((i - l + 1) & 1) * ((r - i + 1) & 1); if(x & 1) ans ^= a[i]; } cout << ans << '\n'; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 1 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 1 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 1 ms | 344 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 348 KB | Output is correct |
11 | Correct | 5 ms | 604 KB | Output is correct |
12 | Correct | 4 ms | 604 KB | Output is correct |
13 | Correct | 16 ms | 480 KB | Output is correct |
14 | Correct | 16 ms | 592 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1064 ms | 3924 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 1 ms | 344 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 348 KB | Output is correct |
11 | Correct | 5 ms | 604 KB | Output is correct |
12 | Correct | 4 ms | 604 KB | Output is correct |
13 | Correct | 16 ms | 480 KB | Output is correct |
14 | Correct | 16 ms | 592 KB | Output is correct |
15 | Execution timed out | 1064 ms | 3924 KB | Time limit exceeded |
16 | Halted | 0 ms | 0 KB | - |