結果
問題 | No.85 TVザッピング(1) |
ユーザー |
![]() |
提出日時 | 2015-12-25 01:07:32 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 505 bytes |
コンパイル時間 | 1,214 ms |
コンパイル使用メモリ | 158,556 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-04 17:45:08 |
合計ジャッジ時間 | 2,124 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#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");}