結果
問題 | No.1512 作文 |
ユーザー | titia |
提出日時 | 2021-05-21 21:35:13 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 480 ms / 2,000 ms |
コード長 | 323 bytes |
コンパイル時間 | 363 ms |
コンパイル使用メモリ | 82,492 KB |
実行使用メモリ | 104,048 KB |
最終ジャッジ日時 | 2024-04-18 14:49:36 |
合計ジャッジ時間 | 5,802 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
51,840 KB |
testcase_01 | AC | 34 ms
51,328 KB |
testcase_02 | AC | 35 ms
51,840 KB |
testcase_03 | AC | 34 ms
51,328 KB |
testcase_04 | AC | 348 ms
90,928 KB |
testcase_05 | AC | 338 ms
91,032 KB |
testcase_06 | AC | 345 ms
91,312 KB |
testcase_07 | AC | 343 ms
91,720 KB |
testcase_08 | AC | 335 ms
90,984 KB |
testcase_09 | AC | 69 ms
65,408 KB |
testcase_10 | AC | 71 ms
65,536 KB |
testcase_11 | AC | 68 ms
64,896 KB |
testcase_12 | AC | 73 ms
65,664 KB |
testcase_13 | AC | 71 ms
66,048 KB |
testcase_14 | AC | 78 ms
75,776 KB |
testcase_15 | AC | 74 ms
75,776 KB |
testcase_16 | AC | 78 ms
75,776 KB |
testcase_17 | AC | 74 ms
76,160 KB |
testcase_18 | AC | 75 ms
76,052 KB |
testcase_19 | AC | 75 ms
75,776 KB |
testcase_20 | AC | 74 ms
75,904 KB |
testcase_21 | AC | 38 ms
52,992 KB |
testcase_22 | AC | 36 ms
52,224 KB |
testcase_23 | AC | 38 ms
52,992 KB |
testcase_24 | AC | 39 ms
53,760 KB |
testcase_25 | AC | 38 ms
53,120 KB |
testcase_26 | AC | 36 ms
52,096 KB |
testcase_27 | AC | 36 ms
51,584 KB |
testcase_28 | AC | 35 ms
51,968 KB |
testcase_29 | AC | 35 ms
51,840 KB |
testcase_30 | AC | 36 ms
51,712 KB |
testcase_31 | AC | 37 ms
51,968 KB |
testcase_32 | AC | 35 ms
52,736 KB |
testcase_33 | AC | 36 ms
52,332 KB |
testcase_34 | AC | 38 ms
54,528 KB |
testcase_35 | AC | 61 ms
81,792 KB |
testcase_36 | AC | 62 ms
81,920 KB |
testcase_37 | AC | 45 ms
66,560 KB |
testcase_38 | AC | 63 ms
76,544 KB |
testcase_39 | AC | 70 ms
78,336 KB |
testcase_40 | AC | 480 ms
104,048 KB |
testcase_41 | AC | 177 ms
103,344 KB |
ソースコード
import sys input = sys.stdin.readline N=int(input()) L=[] for i in range(N): S=list(input().strip()) if S==sorted(S): L.append(S) DP=[0]*26 L.sort() for s in L: init=ord(s[0])-97 end=ord(s[-1])-97 xx=DP[init]+len(s) for j in range(end,26): DP[j]=max(DP[j],xx) print(max(DP))