結果

問題 No.85 TVザッピング(1)
ユーザー Ysmr_Ry
提出日時 2014-12-23 23:13:58
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 262 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 40,320 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-04 17:18:50
合計ジャッジ時間 1,185 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf( "%d%d%d", &N, &M, &C );
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<cstdio>
#include<queue>
#define rep(i,a) for(int i=0;i<(a);++i)

int N, M, C;
std::queue<int> que;

int main()
{
	scanf( "%d%d%d", &N, &M, &C );
	
	if( N==1 || M==1 )
	{ puts( M*N==2?"YES":"NO" ); return 0; }

	puts( N&1&&M&1?"NO":"YES" );

	return 0;
}
0