結果

問題 No.1091 Range Xor Query
ユーザー ああいいああいい
提出日時 2021-12-24 10:44:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,278 ms / 2,000 ms
コード長 229 bytes
コンパイル時間 558 ms
コンパイル使用メモリ 11,752 KB
実行使用メモリ 33,048 KB
最終ジャッジ日時 2023-10-19 11:34:40
合計ジャッジ時間 25,143 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,072 KB
testcase_01 AC 29 ms
10,072 KB
testcase_02 AC 28 ms
10,072 KB
testcase_03 AC 170 ms
24,128 KB
testcase_04 AC 772 ms
13,804 KB
testcase_05 AC 795 ms
33,048 KB
testcase_06 AC 52 ms
13,868 KB
testcase_07 AC 854 ms
21,700 KB
testcase_08 AC 1,192 ms
24,348 KB
testcase_09 AC 603 ms
14,500 KB
testcase_10 AC 817 ms
27,792 KB
testcase_11 AC 1,064 ms
30,288 KB
testcase_12 AC 605 ms
31,212 KB
testcase_13 AC 1,268 ms
22,684 KB
testcase_14 AC 886 ms
26,460 KB
testcase_15 AC 947 ms
29,824 KB
testcase_16 AC 954 ms
14,588 KB
testcase_17 AC 1,247 ms
28,732 KB
testcase_18 AC 214 ms
12,536 KB
testcase_19 AC 242 ms
23,504 KB
testcase_20 AC 1,206 ms
21,880 KB
testcase_21 AC 612 ms
12,560 KB
testcase_22 AC 1,130 ms
28,312 KB
testcase_23 AC 1,278 ms
32,908 KB
testcase_24 AC 1,265 ms
32,912 KB
testcase_25 AC 1,269 ms
32,908 KB
testcase_26 AC 1,265 ms
32,912 KB
testcase_27 AC 1,271 ms
32,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,Q = map(int,input().split())
a = list(map(int,input().split()))

Sum = [0] * (N+1)
Sum[0] = 0
for i in range(1,N+1):
    Sum[i] = Sum[i-1]^ a[i-1]
for _ in range(Q):
    l,r = map(int,input().split())
    print(Sum[r]^Sum[l-1])
0