結果
問題 |
No.1512 作文
|
ユーザー |
![]() |
提出日時 | 2021-05-22 16:18:47 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 301 ms / 2,000 ms |
コード長 | 225 bytes |
コンパイル時間 | 361 ms |
コンパイル使用メモリ | 82,240 KB |
実行使用メモリ | 90,564 KB |
最終ジャッジ日時 | 2024-10-10 14:20:43 |
合計ジャッジ時間 | 5,158 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 38 |
ソースコード
n = int(input()) S = [] for _ in range(n): s = input() if s == "".join(sorted(s)): S.append(s) S.sort() A = [0]*125 for s in S: r = ord(s[-1]) A[r] = max(A[r],max(A[:ord(s[0])+1])+len(s)) print(max(A))