# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
642530 | 2022-09-19T18:55:01 Z | Urvuk3 | XORanges (eJOI19_xoranges) | C++17 | 13 ms | 1996 KB |
#include <bits/stdc++.h> #include <chrono> #define ll long long #define ull unsigned long long #define ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define inf 1e15 #define pb push_back #define popb pop_back #define fi first #define sc second #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") using namespace std; using namespace std::chrono; const int maxn = 1e5+1; int a[maxn]; int main(){ int n,q; scanf("%d %d",&n,&q); for(int i = 0;i<n;i++){ scanf("%d",&a[i]); } int qu; int l,u; int ans; while(q--){ cin >> qu>> l >> u; if(qu==1){ a[l-1]=u; }else{ ans = 0; if((u-l+1)%2==0){ printf("0\n"); }else{ for(int i = l-1;i<=u-1;i+=2){ ans^=a[i]; } printf("%lld\n",ans); } } } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 308 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 | 2 ms | 212 KB | Output is correct |
2 | Correct | 2 ms | 316 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 2 ms | 212 KB | Output is correct |
5 | Correct | 2 ms | 212 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 308 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 2 ms | 212 KB | Output is correct |
7 | Correct | 2 ms | 316 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 2 ms | 212 KB | Output is correct |
10 | Correct | 2 ms | 212 KB | Output is correct |
11 | Correct | 8 ms | 456 KB | Output is correct |
12 | Correct | 9 ms | 576 KB | Output is correct |
13 | Correct | 13 ms | 448 KB | Output is correct |
14 | Correct | 12 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 13 ms | 1996 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 308 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 2 ms | 212 KB | Output is correct |
7 | Correct | 2 ms | 316 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 2 ms | 212 KB | Output is correct |
10 | Correct | 2 ms | 212 KB | Output is correct |
11 | Correct | 8 ms | 456 KB | Output is correct |
12 | Correct | 9 ms | 576 KB | Output is correct |
13 | Correct | 13 ms | 448 KB | Output is correct |
14 | Correct | 12 ms | 340 KB | Output is correct |
15 | Runtime error | 13 ms | 1996 KB | Execution killed with signal 11 |
16 | Halted | 0 ms | 0 KB | - |