結果

問題 No.3125 Make It Symmetry
ユーザー forest3
提出日時 2025-06-05 17:14:16
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 403 bytes
コンパイル時間 1,608 ms
コンパイル使用メモリ 165,680 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-06-05 17:14:20
合計ジャッジ時間 3,707 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#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) ans = "No";
	cout << ans << endl;
}
0