結果
問題 | No.1205 Eye Drops |
ユーザー |
|
提出日時 | 2020-08-30 13:06:30 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 347 ms / 2,000 ms |
コード長 | 282 bytes |
コンパイル時間 | 129 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 20,864 KB |
最終ジャッジ日時 | 2024-11-23 20:38:42 |
合計ジャッジ時間 | 6,436 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 37 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n, m = gets.split.map &:to_ieyedrops = m.times.map {gets.split.map &:to_i}eyedrops = eyedrops.sort_by { |(t, _)| t }eyedrops.unshift [0, 0]if (0..m-1).all? { |i| (eyedrops[i+1][1] - eyedrops[i][1]).abs <= (eyedrops[i+1][0] - eyedrops[i][0]) }puts :Yeselseputs :Noend