結果
| 問題 |
No.2922 Rose Garden
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-20 11:52:58 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 227 bytes |
| コンパイル時間 | 498 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 27,776 KB |
| 最終ジャッジ日時 | 2024-10-20 11:53:09 |
| 合計ジャッジ時間 | 10,947 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 33 |
コンパイルメッセージ
Syntax OK
ソースコード
n, s, b = gets.chomp.split.map(&:to_i)
h = gets.chomp.split.map(&:to_i)
cur = h[0]
i = 0
while s >= 0 && i < n-1
if cur <= h[i+1]
i += 1
else
cur += b
s -= 1
end
end
puts s < 0 ? "No" : "Yes"