結果

問題 No.2155 みちらcolor
ユーザー simansiman
提出日時 2022-12-12 01:09:28
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-04-23 19:18:12
合計ジャッジ時間 7,183 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 73 ms
12,160 KB
testcase_02 WA -
testcase_03 AC 77 ms
12,288 KB
testcase_04 AC 78 ms
12,288 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 76 ms
12,160 KB
testcase_08 AC 75 ms
12,160 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 74 ms
12,288 KB
testcase_12 WA -
testcase_13 AC 75 ms
12,288 KB
testcase_14 AC 80 ms
12,160 KB
testcase_15 AC 76 ms
12,288 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 79 ms
12,288 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 79 ms
12,160 KB
testcase_23 AC 80 ms
12,160 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 77 ms
12,288 KB
testcase_27 AC 78 ms
12,288 KB
testcase_28 AC 76 ms
12,160 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 78 ms
12,160 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 79 ms
12,160 KB
testcase_37 AC 82 ms
12,160 KB
testcase_38 AC 80 ms
12,160 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 76 ms
12,160 KB
testcase_45 AC 75 ms
12,160 KB
testcase_46 AC 74 ms
12,160 KB
testcase_47 AC 74 ms
12,288 KB
testcase_48 AC 74 ms
12,288 KB
testcase_49 AC 75 ms
12,160 KB
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 74 ms
12,160 KB
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 AC 74 ms
12,160 KB
testcase_58 AC 74 ms
12,032 KB
testcase_59 AC 77 ms
12,160 KB
testcase_60 AC 75 ms
12,160 KB
testcase_61 WA -
testcase_62 WA -
testcase_63 AC 74 ms
12,288 KB
testcase_64 AC 74 ms
12,160 KB
testcase_65 WA -
testcase_66 AC 74 ms
12,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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

dp = Array.new(M + 1, false)
dp[L] = true

A.each do |a|
  M.downto(L) do |b|
    na = (a + b) / 2
    next if na > M

    dp[na] = true
  end
end

if dp[M]
  puts 'Yes'
else
  puts 'No'
end
0