結果

問題 No.1091 Range Xor Query
ユーザー pluto77pluto77
提出日時 2020-06-25 09:17:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,260 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 31,220 KB
最終ジャッジ日時 2023-09-16 21:44:38
合計ジャッジ時間 24,649 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,884 KB
testcase_01 AC 15 ms
7,788 KB
testcase_02 AC 16 ms
7,836 KB
testcase_03 AC 153 ms
22,284 KB
testcase_04 AC 772 ms
11,652 KB
testcase_05 AC 789 ms
31,220 KB
testcase_06 AC 37 ms
11,916 KB
testcase_07 AC 824 ms
19,732 KB
testcase_08 AC 1,171 ms
22,432 KB
testcase_09 AC 589 ms
12,860 KB
testcase_10 AC 802 ms
25,972 KB
testcase_11 AC 1,036 ms
28,492 KB
testcase_12 AC 584 ms
29,284 KB
testcase_13 AC 1,246 ms
20,784 KB
testcase_14 AC 873 ms
24,492 KB
testcase_15 AC 930 ms
28,984 KB
testcase_16 AC 938 ms
12,620 KB
testcase_17 AC 1,234 ms
26,848 KB
testcase_18 AC 199 ms
10,332 KB
testcase_19 AC 224 ms
21,672 KB
testcase_20 AC 1,211 ms
20,040 KB
testcase_21 AC 586 ms
10,432 KB
testcase_22 AC 1,131 ms
26,440 KB
testcase_23 AC 1,254 ms
31,036 KB
testcase_24 AC 1,236 ms
31,084 KB
testcase_25 AC 1,243 ms
31,000 KB
testcase_26 AC 1,251 ms
31,072 KB
testcase_27 AC 1,260 ms
30,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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