結果

問題 No.3125 Make It Symmetry
ユーザー 北杜七星
提出日時 2025-04-25 22:48:26
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 514 bytes
コンパイル時間 3,255 ms
コンパイル使用メモリ 273,184 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-04-25 22:48:32
合計ジャッジ時間 5,070 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (ll)(n); i++)
#define all(a) (a).begin(), (a).end()
using ll = long long;
const int INF32 = 2e9;
const ll INF64 = 4e18;

void printYN(bool ok){
    if(ok)cout << "Yes" << endl;
    else cout << "No" << endl;
    return;
}

int main() {
    int N;
    cin >> N;
    int cnt = 0;
    rep(i, N)rep(j, N){
        char c; cin >> c;
        if(c=='#')cnt++;
    }
    printYN(((cnt+1)%2)||N%2);
    return 0;
}
0