結果

問題 No.1091 Range Xor Query
ユーザー 👑 hos.lyrichos.lyric
提出日時 2020-07-30 02:00:27
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,026 ms / 2,000 ms
コード長 123 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 11,564 KB
実行使用メモリ 37,284 KB
最終ジャッジ日時 2023-09-13 17:07:42
合計ジャッジ時間 23,953 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,240 KB
testcase_01 AC 79 ms
15,044 KB
testcase_02 AC 80 ms
15,164 KB
testcase_03 AC 199 ms
27,688 KB
testcase_04 AC 639 ms
19,536 KB
testcase_05 AC 641 ms
36,748 KB
testcase_06 AC 102 ms
17,540 KB
testcase_07 AC 688 ms
27,940 KB
testcase_08 AC 925 ms
28,752 KB
testcase_09 AC 501 ms
21,012 KB
testcase_10 AC 667 ms
35,100 KB
testcase_11 AC 839 ms
36,968 KB
testcase_12 AC 494 ms
36,864 KB
testcase_13 AC 974 ms
29,528 KB
testcase_14 AC 707 ms
34,724 KB
testcase_15 AC 753 ms
36,928 KB
testcase_16 AC 750 ms
21,936 KB
testcase_17 AC 988 ms
37,284 KB
testcase_18 AC 219 ms
16,652 KB
testcase_19 AC 243 ms
27,732 KB
testcase_20 AC 949 ms
28,964 KB
testcase_21 AC 508 ms
17,396 KB
testcase_22 AC 876 ms
35,916 KB
testcase_23 AC 987 ms
36,884 KB
testcase_24 AC 1,026 ms
36,836 KB
testcase_25 AC 1,009 ms
36,796 KB
testcase_26 AC 1,008 ms
36,832 KB
testcase_27 AC 1,002 ms
37,020 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Main.rb:1: warning: assigned but unused variable - q
Syntax OK

ソースコード

diff #

n,q=gets.split.map &:to_i
a=gets.split.map &:to_i
z=0
b=[0]+a.map{|x|z=z^x}
$<.map{|s|l,r=s.split;p b[l.to_i-1]^b[r.to_i]}
0