結果
問題 |
No.3125 Make It Symmetry
|
ユーザー |
![]() |
提出日時 | 2025-06-05 17:27:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 8 ms / 2,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 1,778 ms |
コンパイル使用メモリ | 165,612 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-06-05 17:27:44 |
合計ジャッジ時間 | 3,817 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 36 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) using ll = long long; int main(){ int N; cin >> N; vector<string> s(N); rep(i, 0, N) cin >> s[i]; int c = 0; rep(i, 0, N) { rep(j, 0, N) { int k = N - 1 - j; if(k <= j) break; if(s[i][j] != s[i][k]) c++; } } string ans = "Yes"; if(c % 2 && N % 2 == 0) ans = "No"; cout << ans << endl; }