結果

問題 No.1091 Range Xor Query
ユーザー hir355hir355
提出日時 2020-08-01 21:43:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,276 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 31,184 KB
最終ジャッジ日時 2023-09-22 17:02:38
合計ジャッジ時間 27,061 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,832 KB
testcase_01 AC 15 ms
7,836 KB
testcase_02 AC 15 ms
7,864 KB
testcase_03 AC 150 ms
22,240 KB
testcase_04 AC 774 ms
11,572 KB
testcase_05 AC 788 ms
31,184 KB
testcase_06 AC 36 ms
11,876 KB
testcase_07 AC 828 ms
19,836 KB
testcase_08 AC 1,169 ms
22,308 KB
testcase_09 AC 594 ms
12,608 KB
testcase_10 AC 815 ms
25,924 KB
testcase_11 AC 1,044 ms
28,316 KB
testcase_12 AC 573 ms
29,344 KB
testcase_13 AC 1,259 ms
20,900 KB
testcase_14 AC 872 ms
24,636 KB
testcase_15 AC 931 ms
28,808 KB
testcase_16 AC 929 ms
12,584 KB
testcase_17 AC 1,253 ms
26,868 KB
testcase_18 AC 203 ms
10,460 KB
testcase_19 AC 224 ms
21,532 KB
testcase_20 AC 1,213 ms
19,904 KB
testcase_21 AC 594 ms
10,384 KB
testcase_22 AC 1,103 ms
26,440 KB
testcase_23 AC 1,258 ms
30,948 KB
testcase_24 AC 1,250 ms
30,992 KB
testcase_25 AC 1,254 ms
31,000 KB
testcase_26 AC 1,250 ms
31,032 KB
testcase_27 AC 1,276 ms
30,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, q = map(int, input().split())
a = [0] + list(map(int, input().split()))
for i in range(n):
    a[i + 1] ^= a[i]
for _ in range(q):
    l, r = map(int, input().split())
    print(a[r] ^ a[l - 1])
0