結果

問題 No.1091 Range Xor Query
ユーザー 👑 KazunKazun
提出日時 2020-06-25 23:53:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 506 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 120,968 KB
最終ジャッジ日時 2023-09-16 23:13:19
合計ジャッジ時間 12,426 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,076 KB
testcase_01 AC 63 ms
71,432 KB
testcase_02 AC 63 ms
71,360 KB
testcase_03 AC 149 ms
103,028 KB
testcase_04 AC 338 ms
81,848 KB
testcase_05 AC 334 ms
118,740 KB
testcase_06 AC 80 ms
80,212 KB
testcase_07 AC 343 ms
96,824 KB
testcase_08 AC 445 ms
103,200 KB
testcase_09 AC 272 ms
83,584 KB
testcase_10 AC 346 ms
106,972 KB
testcase_11 AC 425 ms
113,644 KB
testcase_12 AC 283 ms
115,692 KB
testcase_13 AC 488 ms
99,688 KB
testcase_14 AC 363 ms
106,960 KB
testcase_15 AC 386 ms
115,416 KB
testcase_16 AC 389 ms
84,296 KB
testcase_17 AC 496 ms
110,712 KB
testcase_18 AC 156 ms
78,772 KB
testcase_19 AC 171 ms
99,616 KB
testcase_20 AC 484 ms
98,712 KB
testcase_21 AC 273 ms
78,764 KB
testcase_22 AC 430 ms
109,652 KB
testcase_23 AC 476 ms
120,388 KB
testcase_24 AC 477 ms
120,640 KB
testcase_25 AC 487 ms
120,568 KB
testcase_26 AC 492 ms
120,968 KB
testcase_27 AC 506 ms
120,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,Q=map(int,input().split())
A=list(map(int,input().split()))

S=[0]
for i in range(N):
    S.append(S[-1]^A[i])

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