結果

問題 No.1091 Range Xor Query
ユーザー ttrttr
提出日時 2020-06-28 15:58:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,262 ms / 2,000 ms
コード長 205 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 31,176 KB
最終ジャッジ日時 2023-09-22 02:23:50
合計ジャッジ時間 26,088 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,796 KB
testcase_01 AC 15 ms
7,800 KB
testcase_02 AC 16 ms
7,856 KB
testcase_03 AC 157 ms
22,284 KB
testcase_04 AC 758 ms
11,668 KB
testcase_05 AC 771 ms
31,176 KB
testcase_06 AC 37 ms
11,964 KB
testcase_07 AC 811 ms
19,876 KB
testcase_08 AC 1,157 ms
22,360 KB
testcase_09 AC 569 ms
12,780 KB
testcase_10 AC 768 ms
25,916 KB
testcase_11 AC 1,016 ms
28,272 KB
testcase_12 AC 586 ms
29,176 KB
testcase_13 AC 1,224 ms
20,888 KB
testcase_14 AC 851 ms
24,620 KB
testcase_15 AC 909 ms
28,940 KB
testcase_16 AC 932 ms
12,612 KB
testcase_17 AC 1,202 ms
26,864 KB
testcase_18 AC 193 ms
10,284 KB
testcase_19 AC 226 ms
21,628 KB
testcase_20 AC 1,169 ms
20,088 KB
testcase_21 AC 575 ms
10,508 KB
testcase_22 AC 1,080 ms
26,400 KB
testcase_23 AC 1,225 ms
30,924 KB
testcase_24 AC 1,228 ms
30,888 KB
testcase_25 AC 1,262 ms
30,952 KB
testcase_26 AC 1,255 ms
31,020 KB
testcase_27 AC 1,221 ms
31,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,Q = map(int, input().split())
A = [int(a) for a in input().split()]

L = [0]*(N+1)
for i in range(N):
    L[i+1] = L[i]^A[i]

for _ in range(Q):
    l,r = map(int, input().split())
    print(L[r]^L[l-1])
0