結果

問題 No.1091 Range Xor Query
ユーザー 37zigen37zigen
提出日時 2020-07-02 05:54:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,266 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 10,512 KB
実行使用メモリ 31,148 KB
最終ジャッジ日時 2023-10-12 17:45:30
合計ジャッジ時間 25,053 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,120 KB
testcase_01 AC 17 ms
8,068 KB
testcase_02 AC 16 ms
8,156 KB
testcase_03 AC 141 ms
22,252 KB
testcase_04 AC 754 ms
11,684 KB
testcase_05 AC 782 ms
31,148 KB
testcase_06 AC 34 ms
11,968 KB
testcase_07 AC 822 ms
19,964 KB
testcase_08 AC 1,165 ms
22,344 KB
testcase_09 AC 582 ms
12,896 KB
testcase_10 AC 792 ms
25,908 KB
testcase_11 AC 1,026 ms
28,276 KB
testcase_12 AC 556 ms
29,396 KB
testcase_13 AC 1,266 ms
20,800 KB
testcase_14 AC 857 ms
24,432 KB
testcase_15 AC 925 ms
28,856 KB
testcase_16 AC 948 ms
12,764 KB
testcase_17 AC 1,222 ms
26,724 KB
testcase_18 AC 199 ms
10,524 KB
testcase_19 AC 216 ms
21,680 KB
testcase_20 AC 1,203 ms
20,184 KB
testcase_21 AC 588 ms
10,416 KB
testcase_22 AC 1,096 ms
26,428 KB
testcase_23 AC 1,235 ms
31,084 KB
testcase_24 AC 1,229 ms
30,936 KB
testcase_25 AC 1,221 ms
31,100 KB
testcase_26 AC 1,229 ms
30,940 KB
testcase_27 AC 1,237 ms
30,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
N,Q=map(int,input().split())
a=[0]+[int(x) for x in input().split()]
a=list(itertools.accumulate(a,lambda x,y:x^y))
for i in range(Q):
    l,r=map(int,input().split())
    print(a[r]^a[l-1])
0