結果

問題 No.3125 Make It Symmetry
ユーザー ont
提出日時 2025-05-11 20:25:17
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,166 bytes
コンパイル時間 4,422 ms
コンパイル使用メモリ 253,424 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-05-11 20:25:24
合計ジャッジ時間 6,481 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define NP next_permutation
const int INF32 = 2e9;
const ll INF64 = 2e18;
const ll mod = 998244353;
// const ll mod = 1e9 + 7;
template<typename T> bool chmin(T &a, T b){if(a > b){a = b; return true;} return false;}
template<typename T> bool chmax(T &a, T b){if(a < b){a = b; return true;} return false;}
 
void cincout() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);
}
 
int main() {
    cincout();
 
    int N;
    cin >> N;

    vector<vector<char>> A(N, vector<char>(N));
    for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) cin >> A[i][j];

    int cnt = 0;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < N; j++) {
            if (A[i][j] != A[j][N - 1 - i]) cnt++;
        }
    }

    cnt /= 2;

    cout << (cnt % 2 == 0 ? "Yes" : "No") << endl;
}
0