結果

問題 No.1205 Eye Drops
ユーザー tentententen
提出日時 2020-09-02 08:39:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 723 ms / 2,000 ms
コード長 614 bytes
コンパイル時間 2,278 ms
コンパイル使用メモリ 71,720 KB
実行使用メモリ 64,680 KB
最終ジャッジ日時 2023-08-15 13:37:26
合計ジャッジ時間 10,186 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,672 KB
testcase_01 AC 124 ms
55,984 KB
testcase_02 AC 187 ms
55,928 KB
testcase_03 AC 125 ms
55,708 KB
testcase_04 AC 132 ms
55,696 KB
testcase_05 AC 152 ms
56,220 KB
testcase_06 AC 160 ms
53,968 KB
testcase_07 AC 122 ms
55,644 KB
testcase_08 AC 131 ms
53,604 KB
testcase_09 AC 141 ms
55,960 KB
testcase_10 AC 153 ms
56,224 KB
testcase_11 AC 190 ms
56,188 KB
testcase_12 AC 136 ms
55,848 KB
testcase_13 AC 173 ms
56,044 KB
testcase_14 AC 178 ms
55,908 KB
testcase_15 AC 176 ms
56,116 KB
testcase_16 AC 159 ms
55,960 KB
testcase_17 AC 123 ms
55,812 KB
testcase_18 AC 150 ms
55,968 KB
testcase_19 AC 138 ms
55,840 KB
testcase_20 AC 171 ms
56,428 KB
testcase_21 AC 129 ms
55,620 KB
testcase_22 AC 171 ms
55,860 KB
testcase_23 AC 178 ms
56,436 KB
testcase_24 AC 134 ms
55,920 KB
testcase_25 AC 120 ms
55,696 KB
testcase_26 AC 140 ms
55,692 KB
testcase_27 AC 130 ms
55,788 KB
testcase_28 AC 172 ms
56,380 KB
testcase_29 AC 130 ms
56,020 KB
testcase_30 AC 138 ms
55,696 KB
testcase_31 AC 139 ms
55,716 KB
testcase_32 AC 122 ms
55,988 KB
testcase_33 AC 122 ms
56,064 KB
testcase_34 AC 122 ms
55,856 KB
testcase_35 AC 123 ms
56,000 KB
testcase_36 AC 123 ms
55,704 KB
testcase_37 AC 723 ms
64,680 KB
testcase_38 AC 121 ms
55,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    static final int MOD = 1000000007;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        long prevT = 0;
        int prevP = 0;
        for (int i = 0; i < m; i++) {
            long t = sc.nextLong();
            int p = sc.nextInt();
            if (t - prevT < Math.abs(p - prevP)) {
                System.out.println("No");
                return;
            }
            prevT = t;
            prevP = p;
        }
        System.out.println("Yes");
    }
}
0