結果

問題 No.1512 作文
ユーザー convexineqconvexineq
提出日時 2021-05-22 16:18:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 309 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 90,824 KB
最終ジャッジ日時 2024-04-18 20:53:49
合計ジャッジ時間 5,570 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
56,192 KB
testcase_01 AC 39 ms
51,584 KB
testcase_02 AC 39 ms
51,456 KB
testcase_03 AC 39 ms
51,584 KB
testcase_04 AC 236 ms
83,200 KB
testcase_05 AC 227 ms
83,328 KB
testcase_06 AC 223 ms
83,072 KB
testcase_07 AC 227 ms
83,456 KB
testcase_08 AC 226 ms
83,072 KB
testcase_09 AC 74 ms
63,616 KB
testcase_10 AC 79 ms
64,256 KB
testcase_11 AC 73 ms
64,000 KB
testcase_12 AC 78 ms
64,256 KB
testcase_13 AC 75 ms
64,000 KB
testcase_14 AC 110 ms
76,416 KB
testcase_15 AC 111 ms
76,672 KB
testcase_16 AC 110 ms
76,544 KB
testcase_17 AC 102 ms
76,416 KB
testcase_18 AC 101 ms
76,544 KB
testcase_19 AC 109 ms
76,544 KB
testcase_20 AC 105 ms
76,288 KB
testcase_21 AC 40 ms
53,248 KB
testcase_22 AC 41 ms
52,224 KB
testcase_23 AC 45 ms
53,760 KB
testcase_24 AC 41 ms
54,016 KB
testcase_25 AC 42 ms
53,376 KB
testcase_26 AC 36 ms
51,456 KB
testcase_27 AC 40 ms
51,200 KB
testcase_28 AC 36 ms
51,200 KB
testcase_29 AC 41 ms
51,712 KB
testcase_30 AC 35 ms
51,840 KB
testcase_31 AC 40 ms
57,216 KB
testcase_32 AC 41 ms
57,088 KB
testcase_33 AC 44 ms
56,576 KB
testcase_34 AC 43 ms
57,856 KB
testcase_35 AC 53 ms
62,336 KB
testcase_36 AC 51 ms
62,720 KB
testcase_37 AC 44 ms
58,368 KB
testcase_38 AC 55 ms
68,224 KB
testcase_39 AC 57 ms
69,376 KB
testcase_40 AC 309 ms
90,824 KB
testcase_41 AC 221 ms
83,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
0