結果

問題 No.1091 Range Xor Query
ユーザー Konton7Konton7
提出日時 2020-06-26 21:45:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,268 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 31,220 KB
最終ジャッジ日時 2023-09-18 03:55:35
合計ジャッジ時間 24,441 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,756 KB
testcase_01 AC 15 ms
7,960 KB
testcase_02 AC 15 ms
7,932 KB
testcase_03 AC 150 ms
22,180 KB
testcase_04 AC 761 ms
11,664 KB
testcase_05 AC 786 ms
31,220 KB
testcase_06 AC 36 ms
11,820 KB
testcase_07 AC 821 ms
19,308 KB
testcase_08 AC 1,181 ms
23,452 KB
testcase_09 AC 589 ms
12,880 KB
testcase_10 AC 813 ms
25,764 KB
testcase_11 AC 1,026 ms
28,448 KB
testcase_12 AC 579 ms
29,264 KB
testcase_13 AC 1,268 ms
20,820 KB
testcase_14 AC 861 ms
24,476 KB
testcase_15 AC 919 ms
27,804 KB
testcase_16 AC 930 ms
12,940 KB
testcase_17 AC 1,233 ms
26,912 KB
testcase_18 AC 202 ms
10,588 KB
testcase_19 AC 222 ms
21,552 KB
testcase_20 AC 1,216 ms
19,996 KB
testcase_21 AC 581 ms
10,552 KB
testcase_22 AC 1,111 ms
26,312 KB
testcase_23 AC 1,240 ms
31,024 KB
testcase_24 AC 1,240 ms
30,932 KB
testcase_25 AC 1,248 ms
30,904 KB
testcase_26 AC 1,234 ms
31,080 KB
testcase_27 AC 1,244 ms
31,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, q = [int(v) for v in input().split()]
a = [0]
b = [int(v) for v in input().split()]
for i in range(n):
    a.append(a[-1] ^ b[i])

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