結果
問題 | No.85 TVザッピング(1) |
ユーザー |
|
提出日時 | 2016-08-29 17:19:30 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 412 bytes |
コンパイル時間 | 712 ms |
コンパイル使用メモリ | 111,744 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 03:49:15 |
合計ジャッジ時間 | 1,701 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
import std.algorithm, std.array, std.container, std.range; import std.string, std.conv, std.bigint, std.math, std.random; import std.stdio, std.typecons; void main() { auto rd = readln.split.map!(to!int); auto n = rd[0]; auto m = rd[1]; auto c = rd[2]; if (n > m) swap(n, m); if (n == 1) { writeln(m == 2 ? "YES" : "NO"); } else { writeln(n % 2 == 0 || m % 2 == 0 ? "YES" : "NO"); } }