結果
| 問題 | No.85 TVザッピング(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-21 18:40:26 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 57 ms / 5,000 ms |
| + 146µs | |
| コード長 | 652 bytes |
| 記録 | |
| コンパイル時間 | 2,421 ms |
| コンパイル使用メモリ | 86,156 KB |
| 実行使用メモリ | 42,752 KB |
| 最終ジャッジ日時 | 2026-09-10 06:29:56 |
| 合計ジャッジ時間 | 5,755 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
import java.util.Scanner;
public class Main_yukicoder85 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int w = sc.nextInt();
@SuppressWarnings("unused")
int c = sc.nextInt();
int b = Math.max(h, w);
int s = Math.min(h, w);
if (s == 1 && b > 2) {
System.out.println("NO");
} else if (s == 1 && b <= 2) {
System.out.println("YES");
} else if (s % 2 == 1 && b % 2 == 1) {
System.out.println("NO");
} else {
System.out.println("YES");
}
sc.close();
}
}