結果

問題 No.819 Enjapma game
ユーザー a
提出日時 2019-04-19 23:09:02
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 465 bytes
コンパイル時間 1,525 ms
コンパイル使用メモリ 169,900 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-23 04:14:25
合計ジャッジ時間 2,464 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"

using namespace std;

void solve()
{
	int h, w;
	cin >> h >> w;
	vector<string> g(h);
	for (auto &l : g) cin >> l;
	reverse(g.begin(), g.end());
	int oc = 0, ec = 0;
	for (int i = 0; i < h; i++)
	{
		for (int j = 0; j < w; j++)
		{
			if (g[i][j] == 'o')
			{
				((i + j + 1) % 2 ? oc : ec) += 1;
			}
		}
	}
	cout << ((oc + ec + 1) % 2 ? "YES" : "NO") << endl;
}

int main()
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}
0