結果
| 問題 | No.1205 Eye Drops |
| コンテスト | |
| ユーザー |
xRS43BofaUEZ5gc
|
| 提出日時 | 2021-03-03 10:32:06 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 591 bytes |
| 記録 | |
| コンパイル時間 | 2,492 ms |
| コンパイル使用メモリ | 86,084 KB |
| 実行使用メモリ | 54,740 KB |
| 最終ジャッジ日時 | 2026-09-09 08:53:49 |
| 合計ジャッジ時間 | 9,694 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 24 RE * 1 |
ソースコード
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");
}
}
xRS43BofaUEZ5gc