結果

問題 No.3125 Make It Symmetry
ユーザー shimaaa
提出日時 2025-04-25 21:33:30
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 644 bytes
コンパイル時間 3,604 ms
コンパイル使用メモリ 277,236 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-04-25 21:33:41
合計ジャッジ時間 4,313 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using LI = long long int;
using LD = long double;
using namespace std;
template <typename T>
using APQUE = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
using DPQUE = priority_queue<T>;

int main() {
    int n;
    cin >> n;
    if (n % 2 == 1) {
        cout << "Yes" << endl;
        return 0;
    }
    vector<string> grid(n);
    rep(i, n) cin >> grid[i];
    for (auto &row : grid) {
        if (count(row.begin(), row.end(), '#') % 2 == 1) {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}
0