結果

問題 No.2692 How Many Times Reached?
ユーザー miztom
提出日時 2024-03-23 14:03:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 54,400 KB
最終ジャッジ日時 2024-09-30 13:28:02
合計ジャッジ時間 3,540 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
s=[input()for i in range(n)]
C=[".",*"A"*~-n]
r=sum(C==sorted(i)for i in s)+sum(C==sorted(i)for i in zip(*s))
c=d=""
for i in range(n):c+=s[i][i];d+=s[i][~i]
print(r+(C==sorted(c))+(C==sorted(d)))
0