結果
問題 | No.1205 Eye Drops |
ユーザー | xRS43BofaUEZ5gc |
提出日時 | 2021-03-03 10:32:06 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 591 bytes |
コンパイル時間 | 3,357 ms |
コンパイル使用メモリ | 77,964 KB |
実行使用メモリ | 65,900 KB |
最終ジャッジ日時 | 2024-04-14 05:53:31 |
合計ジャッジ時間 | 14,354 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 127 ms
54,268 KB |
testcase_01 | AC | 126 ms
54,232 KB |
testcase_02 | AC | 157 ms
54,268 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 165 ms
54,156 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 185 ms
55,008 KB |
testcase_12 | WA | - |
testcase_13 | AC | 145 ms
54,416 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 144 ms
54,272 KB |
testcase_17 | WA | - |
testcase_18 | AC | 156 ms
54,344 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 157 ms
54,024 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 629 ms
65,900 KB |
testcase_33 | AC | 623 ms
60,840 KB |
testcase_34 | AC | 604 ms
63,392 KB |
testcase_35 | AC | 619 ms
64,340 KB |
testcase_36 | AC | 646 ms
60,204 KB |
testcase_37 | RE | - |
testcase_38 | WA | - |
ソースコード
import java.util.Scanner; public class HelloWorld { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); String[] str = sc.nextLine().split(" "); int n = 0; int m = Integer.parseInt(str[1]); boolean flag = true; for (int i = 0; i < m; i ++) { str = sc.nextLine().split(" "); if (Integer.parseInt(str[0]) >= n + Integer.parseInt(str[1])) { n = Integer.parseInt(str[1]); }else { flag = false; } } System.out.println(flag ? "Yes" : "No"); } }