結果
| 問題 |
No.85 TVザッピング(1)
|
| コンテスト | |
| ユーザー |
ninoinui
|
| 提出日時 | 2020-09-26 06:17:20 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 5,000 ms |
| コード長 | 508 bytes |
| コンパイル時間 | 2,732 ms |
| コンパイル使用メモリ | 191,052 KB |
| 最終ジャッジ日時 | 2025-01-14 21:56:29 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U> void cmin(T &a, U b) {
if (a > b) a = b;
}
template <typename T, typename U> void cmax(T &a, U b) {
if (a < b) a = b;
}
signed main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int N, M, C;
cin >> N >> M >> C;
if ((N == 1 && M == 2) || (N == 2 && M == 1)) return cout << "YES" << "\n", 0;
if (N == 1 || M == 1) return cout << "NO" << "\n", 0;
cout << ((N % 2 && M % 2) ? "NO" : "YES") << "\n";
}
ninoinui