結果

問題 No.1205 Eye Drops
ユーザー face4
提出日時 2021-04-11 13:09:00
言語 Kotlin
(2.1.0)
結果
WA  
実行時間 -
コード長 341 bytes
コンパイル時間 11,982 ms
コンパイル使用メモリ 437,752 KB
実行使用メモリ 56,988 KB
最終ジャッジ日時 2024-06-27 08:25:04
合計ジャッジ時間 25,776 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other AC * 30 WA * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
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