結果

問題 No.85 TVザッピング(1)
ユーザー h_noson
提出日時 2016-02-27 11:55:20
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 587 bytes
コンパイル時間 1,016 ms
コンパイル使用メモリ 58,968 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-04 17:51:00
合計ジャッジ時間 1,688 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

#define RREP(i,s,e) for (i = e-1; i >= s; i--)
#define rrep(i,n) RREP(i,0,n)
#define REP(i,s,e) for (i = s; i < e; i++)
#define rep(i,n) REP(i,0,n)
#define INF 1e8

typedef long long ll;

int main() {
    int n, m, c;
    cin >> n >> m >> c;
    if (min(n,m) == 1) {
        if (max(n,m) == 2)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
    else if (n % 2 == 1 && m % 2 == 1)
        cout << "NO" << endl;
    else
        cout << "YES" << endl;
    return 0;
}
0