# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1048897 | 2024-08-08T10:36:43 Z | Nickpapadak | XORanges (eJOI19_xoranges) | C++14 | 1000 ms | 1884 KB |
#include<bits/stdc++.h> using namespace std; const unsigned int MAXN = 2e+5 + 10; int pf[MAXN], a[MAXN]; int N, Q; int main(){ scanf("%d%d",&N,&Q); for(int i = 1; i<=N;++i){ scanf("%d",&a[i]); pf[i] = pf[i-1] ^ a[i]; } while(Q--){ int s,b, type; scanf("%d%d%d", &type, &s, &b); if(type == 2){ int ans = 0; for(int i = 1; i <= b; ++i){ for(int j = s; j+i-1 <= b;++j){ ans ^= (pf[j+i-1] ^ pf[j-1]); } } printf("%d\n", ans); }else{ a[s] = b; for(int i = s; i<=N;++i){ pf[i] = pf[i-1] ^ a[i]; } } } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | 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 | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 348 KB | Output is correct |
2 | Correct | 6 ms | 452 KB | Output is correct |
3 | Correct | 8 ms | 344 KB | Output is correct |
4 | Correct | 27 ms | 432 KB | Output is correct |
5 | Correct | 27 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | 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 | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 6 ms | 348 KB | Output is correct |
7 | Correct | 6 ms | 452 KB | Output is correct |
8 | Correct | 8 ms | 344 KB | Output is correct |
9 | Correct | 27 ms | 432 KB | Output is correct |
10 | Correct | 27 ms | 348 KB | Output is correct |
11 | Execution timed out | 1060 ms | 580 KB | Time limit exceeded |
12 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1056 ms | 1884 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | 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 | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 6 ms | 348 KB | Output is correct |
7 | Correct | 6 ms | 452 KB | Output is correct |
8 | Correct | 8 ms | 344 KB | Output is correct |
9 | Correct | 27 ms | 432 KB | Output is correct |
10 | Correct | 27 ms | 348 KB | Output is correct |
11 | Execution timed out | 1060 ms | 580 KB | Time limit exceeded |
12 | Halted | 0 ms | 0 KB | - |