結果

問題 No.85 TVザッピング(1)
ユーザー 西尾西尾
提出日時 2018-03-22 11:27:57
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 358 bytes
コンパイル時間 1,435 ms
コンパイル使用メモリ 165,460 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-24 20:04:59
合計ジャッジ時間 2,292 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
int N;
int M;

	cin >> N;
	cin >> M;

	if( N == 1 && M == 1 )
		cout << "YES" << endl;
	else if( N == 1 && M > 2 )
		cout << "NO" << endl;
	else if( N > 2 && M == 1 )
		cout << "NO" << endl;
	else if( N % 2 == 1 && M % 2 == 1 )
		cout << "NO" << endl;
	else
		cout << "YES" << endl;

	return 0;
}

0