結果

問題 No.2056 非力なレッド
ユーザー simansiman
提出日時 2022-08-28 12:21:57
言語 Ruby
(3.3.0)
結果
AC  
実行時間 254 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 26,240 KB
最終ジャッジ日時 2024-04-23 11:15:57
合計ジャッジ時間 8,253 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
12,288 KB
testcase_01 AC 90 ms
12,160 KB
testcase_02 AC 89 ms
12,160 KB
testcase_03 AC 91 ms
12,160 KB
testcase_04 AC 90 ms
12,160 KB
testcase_05 AC 90 ms
12,416 KB
testcase_06 AC 91 ms
12,288 KB
testcase_07 AC 90 ms
12,288 KB
testcase_08 AC 91 ms
12,160 KB
testcase_09 AC 89 ms
12,160 KB
testcase_10 AC 92 ms
12,160 KB
testcase_11 AC 91 ms
12,160 KB
testcase_12 AC 90 ms
12,416 KB
testcase_13 AC 176 ms
21,504 KB
testcase_14 AC 183 ms
21,248 KB
testcase_15 AC 171 ms
21,376 KB
testcase_16 AC 100 ms
12,544 KB
testcase_17 AC 156 ms
17,920 KB
testcase_18 AC 94 ms
12,288 KB
testcase_19 AC 106 ms
13,184 KB
testcase_20 AC 188 ms
23,040 KB
testcase_21 AC 119 ms
13,824 KB
testcase_22 AC 202 ms
21,120 KB
testcase_23 AC 202 ms
19,584 KB
testcase_24 AC 124 ms
15,872 KB
testcase_25 AC 191 ms
23,168 KB
testcase_26 AC 198 ms
24,064 KB
testcase_27 AC 194 ms
23,552 KB
testcase_28 AC 218 ms
26,240 KB
testcase_29 AC 218 ms
25,984 KB
testcase_30 AC 232 ms
26,112 KB
testcase_31 AC 216 ms
25,984 KB
testcase_32 AC 221 ms
26,112 KB
testcase_33 AC 232 ms
26,112 KB
testcase_34 AC 234 ms
26,112 KB
testcase_35 AC 219 ms
25,984 KB
testcase_36 AC 219 ms
25,984 KB
testcase_37 AC 254 ms
25,984 KB
testcase_38 AC 92 ms
12,160 KB
testcase_39 AC 93 ms
12,160 KB
testcase_40 AC 96 ms
12,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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

cur = 0
cost = 0

(N - 1).downto(0) do |i|
  a = A[i]
  cur.times do
    a /= 2
  end

  while a >= X
    a /= 2
    cur += 1
    cost += i + 1
  end
end

if cost <= M
  puts 'Yes'
else
  puts 'No'
end
0