結果
| 問題 |
No.85 TVザッピング(1)
|
| コンテスト | |
| ユーザー |
hotpepsi
|
| 提出日時 | 2014-12-04 23:41:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 422 bytes |
| コンパイル時間 | 443 ms |
| コンパイル使用メモリ | 62,364 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-04 17:10:36 |
| 合計ジャッジ時間 | 1,418 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
#include <iostream>
#include <algorithm>
#include <sstream>
#include <vector>
using namespace std;
bool solve(int N, int M, int C)
{
if (N <= 1 || M <= 1) {
return N <= 2 && M <= 2;
}
return N*M % 2 == 0;
}
int main(int argc, char *argv[])
{
int N, M, C;
string s;
getline(cin, s);
stringstream ss(s);
ss >> N >> M >> C;
cout << (solve(N, M, C) ? "YES" : "NO") << endl;
return 0;
}
hotpepsi