結果

問題 No.1091 Range Xor Query
ユーザー Omura ShunsukeOmura Shunsuke
提出日時 2020-06-24 18:25:08
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 525 ms / 2,000 ms
コード長 204 bytes
コンパイル時間 702 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 122,224 KB
最終ジャッジ日時 2023-09-16 21:10:50
合計ジャッジ時間 13,184 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,452 KB
testcase_01 AC 69 ms
71,388 KB
testcase_02 AC 68 ms
71,128 KB
testcase_03 AC 157 ms
104,092 KB
testcase_04 AC 376 ms
82,236 KB
testcase_05 AC 370 ms
120,492 KB
testcase_06 AC 89 ms
80,872 KB
testcase_07 AC 377 ms
97,604 KB
testcase_08 AC 491 ms
103,988 KB
testcase_09 AC 290 ms
83,824 KB
testcase_10 AC 365 ms
108,092 KB
testcase_11 AC 455 ms
114,936 KB
testcase_12 AC 290 ms
117,196 KB
testcase_13 AC 512 ms
100,484 KB
testcase_14 AC 395 ms
108,064 KB
testcase_15 AC 421 ms
116,600 KB
testcase_16 AC 403 ms
84,600 KB
testcase_17 AC 525 ms
112,292 KB
testcase_18 AC 165 ms
78,760 KB
testcase_19 AC 178 ms
100,680 KB
testcase_20 AC 505 ms
99,552 KB
testcase_21 AC 295 ms
78,860 KB
testcase_22 AC 482 ms
110,648 KB
testcase_23 AC 520 ms
122,224 KB
testcase_24 AC 520 ms
122,100 KB
testcase_25 AC 521 ms
122,132 KB
testcase_26 AC 521 ms
122,216 KB
testcase_27 AC 508 ms
122,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,Q=map(int,input().split())
a=[0]+list(map(int,input().split()))
x=[0]
for i in range(1,N+1):
    x.append(x[-1]^a[i])
#print(x)
for i in range(Q):
    s,e=map(int,input().split())
    print(x[e]^x[s-1])
0