結果
| 問題 |
No.3125 Make It Symmetry
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-02 03:04:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 2,000 ms |
| コード長 | 597 bytes |
| コンパイル時間 | 407 ms |
| コンパイル使用メモリ | 82,236 KB |
| 実行使用メモリ | 82,696 KB |
| 最終ジャッジ日時 | 2025-05-02 03:04:52 |
| 合計ジャッジ時間 | 3,847 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")