답안 #838139

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
838139 2023-08-26T09:20:43 Z BlockOG XORanges (eJOI19_xoranges) C++14
55 / 100
1000 ms 1652 KB
#include <iostream>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
    int n, q; cin >> n >> q;
    unsigned int o[n]; for (int i = 0; i < n; i++) cin >> o[i];

    for (int it = 0; it < q; it++) {
        int code; cin >> code;
        if (code == 1) {
            int i; cin >> i >> o[--i];
        } else {
            int l, u; cin >> l >> u;
            if (!((u - l + 1) & 1)) {
                cout << 0 << endl;
                continue;
            }

            unsigned int res = 0;
            for (int i = l - 1; i < u; i += 2) res ^= o[i];
            cout << res << endl;
        }
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 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 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 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 5 ms 340 KB Output is correct
12 Correct 5 ms 340 KB Output is correct
13 Correct 9 ms 340 KB Output is correct
14 Correct 11 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1031 ms 1652 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 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 5 ms 340 KB Output is correct
12 Correct 5 ms 340 KB Output is correct
13 Correct 9 ms 340 KB Output is correct
14 Correct 11 ms 348 KB Output is correct
15 Execution timed out 1031 ms 1652 KB Time limit exceeded
16 Halted 0 ms 0 KB -