結果
問題 |
No.85 TVザッピング(1)
|
ユーザー |
![]() |
提出日時 | 2019-08-12 00:28:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 329 bytes |
コンパイル時間 | 1,646 ms |
コンパイル使用メモリ | 69,444 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-14 06:35:58 |
合計ジャッジ時間 | 1,589 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int h, w; cin >> h >> w; int _; cin >> _; if (h > w) swap(h, w); if (h == 1) { cout << (w <= 2 ? "YES" : "NO") << endl; } else { cout << (h * w % 2 == 0 ? "YES" : "NO") << endl; } return 0; }