結果
| 問題 |
No.3125 Make It Symmetry
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-25 22:13:01 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 8 ms / 2,000 ms |
| コード長 | 485 bytes |
| コンパイル時間 | 2,001 ms |
| コンパイル使用メモリ | 196,168 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-04-27 20:06:46 |
| 合計ジャッジ時間 | 3,718 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 36 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(n);i++)
int main(){
int n,simai=0;
bool f=false;
cin >> n;
vector<string> g(n);
rep(i,0,n) cin >> g.at(i);
rep(i,0,n){
rep(j,0,n/2){
if(g.at(i).at(j)!=g.at(i).at(n-1-j)){
simai++;
}
}
}
if(simai%2==1){
if(n%2==1){
rep(i,0,n){
if(g.at(i).at((n/2))!='#') f=true;
}
}
if(f){
cout << "Yes" << endl;
}
else cout << "No" << endl;
}
else cout << "Yes" << endl;
}