結果

問題 No.85 TVザッピング(1)
コンテスト
ユーザー sigma425
提出日時 2015-12-25 01:07:32
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 505 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 952 ms
コンパイル使用メモリ 173,316 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-20 12:00:12
合計ジャッジ時間 2,051 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
int H,W;
bool solve(){
	cin>>H>>W;
	if(H>W) swap(H,W);
	if(H==1) return W==2;
	if(H*W%2) return 0;
	return 1;
}
int main(){
	if(solve()) puts("YES");
	else puts("NO");
}
0