結果

問題 No.1091 Range Xor Query
ユーザー 37zigen37zigen
提出日時 2020-07-02 05:51:06
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 1,241 ms / 2,000 ms
コード長 184 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 31,000 KB
最終ジャッジ日時 2023-10-12 17:42:55
合計ジャッジ時間 24,725 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,752 KB
testcase_01 AC 15 ms
7,768 KB
testcase_02 AC 15 ms
7,752 KB
testcase_03 AC 150 ms
22,068 KB
testcase_04 AC 741 ms
11,536 KB
testcase_05 AC 790 ms
31,000 KB
testcase_06 AC 36 ms
11,724 KB
testcase_07 AC 810 ms
19,736 KB
testcase_08 AC 1,146 ms
22,280 KB
testcase_09 AC 568 ms
12,652 KB
testcase_10 AC 778 ms
25,888 KB
testcase_11 AC 1,005 ms
28,180 KB
testcase_12 AC 570 ms
29,312 KB
testcase_13 AC 1,241 ms
20,912 KB
testcase_14 AC 843 ms
24,428 KB
testcase_15 AC 938 ms
28,784 KB
testcase_16 AC 907 ms
12,628 KB
testcase_17 AC 1,197 ms
26,728 KB
testcase_18 AC 197 ms
10,444 KB
testcase_19 AC 223 ms
21,528 KB
testcase_20 AC 1,174 ms
19,876 KB
testcase_21 AC 561 ms
10,376 KB
testcase_22 AC 1,096 ms
26,452 KB
testcase_23 AC 1,195 ms
30,876 KB
testcase_24 AC 1,209 ms
30,944 KB
testcase_25 AC 1,202 ms
30,908 KB
testcase_26 AC 1,211 ms
30,908 KB
testcase_27 AC 1,214 ms
30,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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