結果

問題 No.819 Enjapma game
ユーザー leaf_1415
提出日時 2019-04-19 23:41:44
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 504 ms
コンパイル使用メモリ 54,124 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-23 06:03:29
合計ジャッジ時間 1,504 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

int h, w;

int main(void)
{
	cin >> h >> w;
	
	int cnt = 0;
	for(int i = 0; i < h; i++){
		for(int j = 0; j < w; j++){
			char c;
			cin >> c;
			if(c == 'o') cnt += (h-1-i + j)%2+1;
		}
	}
	if(cnt%3 == 0) cout << "YES" << endl;
	else cout << "NO" << endl;
	return 0;
}
0