結果
| 問題 |
No.1205 Eye Drops
|
| コンテスト | |
| ユーザー |
object1234
|
| 提出日時 | 2020-09-01 18:27:29 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 286 bytes |
| コンパイル時間 | 266 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-23 21:02:05 |
| 合計ジャッジ時間 | 5,210 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 23 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - len Syntax OK
ソースコード
len,input = gets.chomp.split(" ").map(&:to_i)
current = 0
res = "Yes"
input.times do |i|
t,p = gets.chomp.split(" ").map(&:to_i)
sa = t - current
min = current - sa
max = current + sa
if (min..max).include?(p)
current = p
else
res = "No"
break
end
end
puts res
object1234