結果

問題 No.1456 Range Xor
ユーザー simansiman
提出日時 2021-05-09 11:51:22
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 221 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 11,920 KB
実行使用メモリ 27,844 KB
最終ジャッジ日時 2023-10-18 22:02:38
合計ジャッジ時間 10,302 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
16,100 KB
testcase_01 AC 86 ms
16,096 KB
testcase_02 AC 86 ms
16,100 KB
testcase_03 AC 161 ms
27,844 KB
testcase_04 AC 157 ms
27,844 KB
testcase_05 AC 160 ms
27,844 KB
testcase_06 AC 165 ms
27,844 KB
testcase_07 AC 173 ms
27,844 KB
testcase_08 AC 166 ms
27,844 KB
testcase_09 AC 166 ms
27,844 KB
testcase_10 AC 168 ms
27,844 KB
testcase_11 AC 104 ms
18,036 KB
testcase_12 AC 98 ms
16,624 KB
testcase_13 AC 117 ms
19,096 KB
testcase_14 AC 115 ms
19,092 KB
testcase_15 AC 144 ms
26,164 KB
testcase_16 AC 146 ms
25,744 KB
testcase_17 AC 127 ms
21,152 KB
testcase_18 AC 114 ms
19,000 KB
testcase_19 AC 134 ms
22,320 KB
testcase_20 AC 147 ms
25,676 KB
testcase_21 AC 131 ms
22,220 KB
testcase_22 AC 131 ms
22,424 KB
testcase_23 AC 118 ms
20,556 KB
testcase_24 AC 100 ms
17,244 KB
testcase_25 AC 116 ms
18,736 KB
testcase_26 AC 131 ms
21,472 KB
testcase_27 AC 135 ms
25,320 KB
testcase_28 AC 105 ms
18,596 KB
testcase_29 AC 161 ms
26,604 KB
testcase_30 AC 159 ms
27,504 KB
testcase_31 AC 101 ms
18,264 KB
testcase_32 AC 100 ms
18,056 KB
testcase_33 AC 118 ms
20,852 KB
testcase_34 AC 159 ms
27,420 KB
testcase_35 AC 121 ms
21,588 KB
testcase_36 AC 157 ms
27,728 KB
testcase_37 AC 158 ms
26,384 KB
testcase_38 AC 99 ms
17,328 KB
testcase_39 AC 137 ms
25,536 KB
testcase_40 AC 142 ms
25,444 KB
testcase_41 AC 88 ms
16,128 KB
testcase_42 AC 94 ms
16,936 KB
testcase_43 WA -
testcase_44 AC 86 ms
16,100 KB
testcase_45 AC 88 ms
16,100 KB
testcase_46 AC 86 ms
16,100 KB
testcase_47 WA -
testcase_48 AC 86 ms
16,100 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N, K = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)

hash = Hash.new
v = K

A.each do |a|
  v ^= a
  hash[v] = true
end

cur = 0

A.each do |a|
  cur ^= a

  if hash[cur]
    puts 'Yes'
    exit
  end
end

puts 'No'
0