# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
559605 | 2022-05-10T09:19:30 Z | Stavab | XORanges (eJOI19_xoranges) | C++14 | 1000 ms | 3540 KB |
#include <bits/stdc++.h> using namespace std; int main() { int n, q; scanf("%d %d", &n, &q); vector<int> oranges(n + 5, 0); for(int i = 1; i <= n; i++) { scanf("%d", &oranges[i]); } int move; while(q--) { scanf("%d", &move); if(move == 1) { int pos, val; scanf("%d %d", &pos, &val); oranges[pos] = val; } else { int l, u; scanf("%d %d", &l, &u); int ans = 0; for(int i = l; i <= u; i++) { if ((i-l+1)*((u-l+1)-(i-l)) % 2 == 1) { ans = ans ^ oranges[i]; } } printf("%d\n", ans); } } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 300 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 216 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 308 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 300 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 216 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 308 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 1 ms | 212 KB | Output is correct |
10 | Correct | 1 ms | 212 KB | Output is correct |
11 | Correct | 11 ms | 440 KB | Output is correct |
12 | Correct | 8 ms | 448 KB | Output is correct |
13 | Correct | 30 ms | 424 KB | Output is correct |
14 | Correct | 31 ms | 416 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1061 ms | 3540 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 300 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 216 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 308 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 1 ms | 212 KB | Output is correct |
10 | Correct | 1 ms | 212 KB | Output is correct |
11 | Correct | 11 ms | 440 KB | Output is correct |
12 | Correct | 8 ms | 448 KB | Output is correct |
13 | Correct | 30 ms | 424 KB | Output is correct |
14 | Correct | 31 ms | 416 KB | Output is correct |
15 | Execution timed out | 1061 ms | 3540 KB | Time limit exceeded |
16 | Halted | 0 ms | 0 KB | - |