結果

問題 No.1091 Range Xor Query
ユーザー takakintakakin
提出日時 2020-07-18 21:40:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 621 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 433 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 30,684 KB
最終ジャッジ日時 2024-05-08 06:49:32
合計ジャッジ時間 15,789 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,752 KB
testcase_01 AC 32 ms
10,880 KB
testcase_02 AC 32 ms
10,752 KB
testcase_03 AC 140 ms
22,792 KB
testcase_04 AC 353 ms
14,228 KB
testcase_05 AC 441 ms
29,424 KB
testcase_06 AC 53 ms
14,408 KB
testcase_07 AC 412 ms
20,400 KB
testcase_08 AC 576 ms
23,104 KB
testcase_09 AC 279 ms
14,852 KB
testcase_10 AC 422 ms
25,192 KB
testcase_11 AC 554 ms
27,180 KB
testcase_12 AC 356 ms
29,108 KB
testcase_13 AC 606 ms
21,564 KB
testcase_14 AC 459 ms
24,928 KB
testcase_15 AC 481 ms
28,908 KB
testcase_16 AC 431 ms
14,824 KB
testcase_17 AC 621 ms
26,744 KB
testcase_18 AC 117 ms
12,800 KB
testcase_19 AC 166 ms
21,912 KB
testcase_20 AC 590 ms
20,900 KB
testcase_21 AC 274 ms
12,672 KB
testcase_22 AC 567 ms
25,448 KB
testcase_23 AC 587 ms
30,556 KB
testcase_24 AC 586 ms
30,556 KB
testcase_25 AC 593 ms
30,516 KB
testcase_26 AC 584 ms
30,684 KB
testcase_27 AC 588 ms
30,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n,q=map(int,input().split())
A=[int(i) for i in input().split()]
AA=[0]
for a in A:
  AA.append(AA[-1]^a)
for _ in range(q):
  l,r=map(int,input().split())
  print(AA[r]^AA[l-1])
0