結果
| 問題 |
No.3125 Make It Symmetry
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-25 21:29:55 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 8 ms / 2,000 ms |
| コード長 | 832 bytes |
| コンパイル時間 | 3,726 ms |
| コンパイル使用メモリ | 278,280 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-04-25 21:30:15 |
| 合計ジャッジ時間 | 4,298 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef local
#include <debug.hpp>
#else
#define debug(...)
#endif
#define rep(i, n) for (int i = 0; i < n; i++)
template <class T> istream& operator>>(istream& I, vector<T>& V) {for (T& X : V) I >> X; return I;}
template <class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
template <class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
vector<int> di = {-1, 1, 0, 0}, dj = {0, 0, -1, 1}; int inf = 1e9; long INF = 1e18;
int main() {
int n;
cin >> n;
vector<string> s(n);
cin >> s;
if (n & 1) {
cout << "Yes\n";
return 0;
}
int b = 0, w = 0;
rep(i, n) rep(j, n) if (s[i][j] == '#') b++;
w = n * n - b;
cout << (b & 1 ? "No" : "Yes") << endl;
return 0;
}