結果
| 問題 |
No.3125 Make It Symmetry
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-27 17:35:02 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,470 bytes |
| コンパイル時間 | 3,416 ms |
| コンパイル使用メモリ | 276,512 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-04-27 17:35:07 |
| 合計ジャッジ時間 | 4,731 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) (void(0))
#endif
using ll = long long;
using ld = long double;
template <class T> using prique = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <class T> bool chmin(T& x, const T& y) { return (x > y ? x = y, true : false); }
template <class T> bool chmax(T& x, const T& y) { return (x < y ? x = y, true : false); }
#define rep1(a) for (ll _i = 0; _i < (ll)(a); _i++)
#define rep2(i, a) for (ll i = 0; i < (ll)(a); i++)
#define rep3(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define rep4(i, a, b, c) for (ll i = (ll)(a); (0 < (ll)(c) ? i < (ll)(b) : i > (ll)(b)); i += (ll)(c))
#define overload4(a, b, c, d, e, ...) e
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define all(x) std::begin(x), std::end(x)
#define rall(x) std::rbegin(x), std::rend(x)
#define pb push_back
void run_case() {
int N;
cin >> N;
vector<string> A(N);
rep(i, N) cin >> A[i];
int w = 0, b = 0;
rep(i, N) {
rep(j, N/2) if(A[i][j] != A[i][N - j - 1]) {
if(A[i][j] == '#') b++;
else w++;
}
}
w += b;
if(w & 1) cout << "No\n";
else cout << "Yes\n";
}
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
// std::fixed(std::cout).precision(16);
int T = 1;
// cin >> T;
while (T--) run_case();
return 0;
}