結果

問題 No.3125 Make It Symmetry
ユーザー ゼリトキ
提出日時 2025-04-25 21:33:24
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 6 ms / 2,000 ms
コード長 613 bytes
コンパイル時間 3,101 ms
コンパイル使用メモリ 275,176 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-04-25 21:33:40
合計ジャッジ時間 4,255 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
#define mod 998244353
int main(){
    cin.tie(0)->sync_with_stdio(0);
    cout.tie(0);
    int N;
    char A[509][509];
    cin>>N;
    for(int i=1;i<=N;i++){
        for(int j=1;j<=N;j++) cin>>A[i][j];
    }
    int shape=0;
    for(int i=1;i<=N;i++){
        for(int j=1;j<=N;j++){
            if(A[i][j]=='#') shape++;
        }
    }
    shape%=N;
    if(N%2==0){
        if(shape%2==0) cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
    }
    else{
        cout<<"Yes"<<endl;
    }
}

0