結果
| 問題 | No.1512 作文 |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-05-22 16:18:47 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 250 ms / 2,000 ms |
| + 130µs | |
| コード長 | 225 bytes |
| 記録 | |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 80,640 KB |
| 実行使用メモリ | 97,348 KB |
| 最終ジャッジ日時 | 2026-09-13 06:25:08 |
| 合計ジャッジ時間 | 5,451 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))
convexineq