結果

問題 No.1205 Eye Drops
ユーザー face4
提出日時 2021-04-11 13:10:14
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 626 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 11,641 ms
コンパイル使用メモリ 438,236 KB
実行使用メモリ 83,316 KB
最終ジャッジ日時 2024-06-27 08:26:54
合計ジャッジ時間 25,532 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:2:10: warning: variable 'n' is never used
    val (n, m) = readLine()!!.split(" ").map{it.toInt()}
         ^

ソースコード

diff #

fun main() {
    val (n, m) = readLine()!!.split(" ").map{it.toInt()}
    var now: Long = 0
    var pos: Long = 0
    repeat(m){
        val (t, p) = readLine()!!.split(" ").map{it.toLong()}
        if(t-now < Math.abs(pos-p)){
            println("No")
            return
        }
        now = t
        pos = p
    }
    println("Yes")
}
0