結果

問題 No.1205 Eye Drops
ユーザー Maboy
提出日時 2021-06-20 14:03:05
言語 Swift
(6.0.3)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 830 ms
コンパイル使用メモリ 130,252 KB
実行使用メモリ 9,216 KB
最終ジャッジ日時 2024-06-22 22:28:16
合計ジャッジ時間 3,546 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

let n = readLine()!.split(separator: " ").map{Int($0)!}
var s = "Yes"
var (x,t) = (0,0)
for _ in 1...n[1]{
    let l = readLine()!.split(separator: " ").map{Int($0)!}
    if abs(l[1] - x) > abs(l[0] - t){
        s = "No"
    }
    (x,t) = (l[1],l[0])
}
print(s)
0