結果
問題 | No.85 TVザッピング(1) |
ユーザー |
|
提出日時 | 2020-08-08 12:24:13 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 503 bytes |
コンパイル時間 | 2,213 ms |
コンパイル使用メモリ | 190,960 KB |
最終ジャッジ日時 | 2025-01-12 18:48:11 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) bool check(int n, int m) { if (min(n, m) == 1) { if (max(n, m) == 2) return true; else return false; } else { if (n * m % 2 == 0) return true; else return false; } } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, m, c; cin >> n >> m >> c; if (check(n, m)) cout << "YES" << endl; else cout << "NO" << endl; return 0; }