結果
| 問題 |
No.85 TVザッピング(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-27 18:05:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 351 bytes |
| コンパイル時間 | 1,367 ms |
| コンパイル使用メモリ | 166,736 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-04 18:04:40 |
| 合計ジャッジ時間 | 2,180 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const string msg[] = { "NO", "YES" };
signed main(){
int N, M, C; cin >> N >> M >> C;
if( not ( N >= M ) )
swap( N, M );
if( M == 1 )
cout << msg[ N == 2 ] << endl, exit( 0 );
if( N % 2 == 0 or M % 2 == 0 )
cout << msg[ 1 ] << endl;
else
cout << msg[ 0 ] << endl;
return 0;
}