結果
| 問題 | No.3125 Make It Symmetry |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-02 03:04:48 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 120 ms / 2,000 ms |
| コード長 | 597 bytes |
| 記録 | |
| コンパイル時間 | 221 ms |
| コンパイル使用メモリ | 95,724 KB |
| 実行使用メモリ | 92,800 KB |
| 最終ジャッジ日時 | 2026-07-10 10:18:23 |
| 合計ジャッジ時間 | 4,577 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 36 |
ソースコード
N=int(input())
if N%2 == 1:
print("Yes")
exit()
stage=[]
for i in range(N):
s=list(map(str, input()))
stage.append(s)
ok=[[-1]*N for i in range(N)]
for i in range(N):
for j in range(N):
if ok[i][j] == -1:
if stage[i][j] != stage[i][N-j-1]:
ok[i][j] = False
ok[i][N-j-1] = False
else:
ok[i][j] = True
ok[i][N-j-1] = True
res=0
for i in range(N):
for j in range(N):
if ok[i][j] == False:
res += 1
if res%4 == 0:
print("Yes")
else:
print("No")