結果
問題 |
No.3125 Make It Symmetry
|
ユーザー |
![]() |
提出日時 | 2025-05-27 22:43:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 641 bytes |
コンパイル時間 | 1,617 ms |
コンパイル使用メモリ | 163,440 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-05-27 22:43:34 |
合計ジャッジ時間 | 3,447 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 WA * 10 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < int(n); i++) #define FOR(i,a,b) for(ll i = a; i < (ll)(b); i++) #define all(a) (a).begin(),(a).end() using ll = long long; using VI = vector<int>; using P = pair<int,int>; const long long INF = 1LL << 60; const int DX[] = {1,0,-1,0}; const int DY[] = {0,1,0,-1}; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int n; cin >> n; vector<string> s(n); rep(i,n) cin >> s[i]; int cnt = 0; rep(i,n)rep(j,n){ if(s[i][j] != s[i][n-1-j]) cnt++; } cnt /= 2; if(cnt%2 == 0) cout << "Yes" << endl; else cout << "No" << endl; return 0; }