結果

問題 No.1091 Range Xor Query
ユーザー 37zigen37zigen
提出日時 2020-07-02 05:50:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,262 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 1,135 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 31,128 KB
最終ジャッジ日時 2023-10-12 17:42:01
合計ジャッジ時間 27,867 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,176 KB
testcase_01 AC 15 ms
8,032 KB
testcase_02 AC 16 ms
8,064 KB
testcase_03 AC 153 ms
22,204 KB
testcase_04 AC 767 ms
11,572 KB
testcase_05 AC 802 ms
31,128 KB
testcase_06 AC 41 ms
11,756 KB
testcase_07 AC 836 ms
19,828 KB
testcase_08 AC 1,176 ms
22,316 KB
testcase_09 AC 585 ms
12,588 KB
testcase_10 AC 807 ms
25,780 KB
testcase_11 AC 1,039 ms
28,320 KB
testcase_12 AC 583 ms
29,244 KB
testcase_13 AC 1,242 ms
20,844 KB
testcase_14 AC 868 ms
24,560 KB
testcase_15 AC 933 ms
28,852 KB
testcase_16 AC 946 ms
12,620 KB
testcase_17 AC 1,262 ms
26,852 KB
testcase_18 AC 205 ms
10,312 KB
testcase_19 AC 228 ms
21,536 KB
testcase_20 AC 1,212 ms
19,856 KB
testcase_21 AC 582 ms
10,376 KB
testcase_22 AC 1,113 ms
26,392 KB
testcase_23 AC 1,242 ms
30,932 KB
testcase_24 AC 1,247 ms
30,932 KB
testcase_25 AC 1,260 ms
31,004 KB
testcase_26 AC 1,258 ms
30,988 KB
testcase_27 AC 1,237 ms
30,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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