結果

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

ソースコード

diff #

#include <iostream>

using namespace std;

int h, w;
char c[205][205];

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