結果

問題 No.3125 Make It Symmetry
ユーザー startcpp
提出日時 2025-04-25 22:05:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 393 bytes
コンパイル時間 712 ms
コンパイル使用メモリ 61,628 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-04-25 22:05:41
合計ジャッジ時間 2,246 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

// いくらでも、動かせますね?
#include <iostream>
#include <string>
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;

int n;
string s[500];

int main() {
	int i, j;

	cin >> n;
	rep(i, n) cin >> s[i];
	int cnt = 0;
	rep(i, n) rep(j, n) cnt += (s[i][j] == '#'); 

	if (n % 2 == 1 || cnt % 2 == 0) { cout << "Yes" << endl; }
	else { cout << "No" << endl; }
	return 0;
}
0