結果

問題 No.1091 Range Xor Query
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-08-28 20:28:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,399 ms / 2,000 ms
コード長 205 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 30,676 KB
最終ジャッジ日時 2024-04-26 12:30:44
合計ジャッジ時間 27,675 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,624 KB
testcase_01 AC 28 ms
10,624 KB
testcase_02 AC 28 ms
10,752 KB
testcase_03 AC 176 ms
23,700 KB
testcase_04 AC 840 ms
14,528 KB
testcase_05 AC 856 ms
29,412 KB
testcase_06 AC 51 ms
14,432 KB
testcase_07 AC 920 ms
21,016 KB
testcase_08 AC 1,292 ms
23,220 KB
testcase_09 AC 655 ms
14,768 KB
testcase_10 AC 878 ms
25,188 KB
testcase_11 AC 1,170 ms
27,212 KB
testcase_12 AC 626 ms
29,108 KB
testcase_13 AC 1,396 ms
21,676 KB
testcase_14 AC 962 ms
24,916 KB
testcase_15 AC 1,021 ms
29,024 KB
testcase_16 AC 1,004 ms
14,968 KB
testcase_17 AC 1,357 ms
26,860 KB
testcase_18 AC 231 ms
12,800 KB
testcase_19 AC 253 ms
21,908 KB
testcase_20 AC 1,314 ms
21,016 KB
testcase_21 AC 647 ms
12,800 KB
testcase_22 AC 1,242 ms
25,684 KB
testcase_23 AC 1,343 ms
30,672 KB
testcase_24 AC 1,399 ms
30,676 KB
testcase_25 AC 1,379 ms
30,676 KB
testcase_26 AC 1,361 ms
30,676 KB
testcase_27 AC 1,333 ms
30,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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