結果
| 問題 |
No.1512 作文
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-22 11:09:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 258 bytes |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 24,900 KB |
| 最終ジャッジ日時 | 2024-10-10 10:51:39 |
| 合計ジャッジ時間 | 6,943 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 29 WA * 9 |
ソースコード
N = int(input())
S = []
for _ in range(N):
s = input()
l = list(s)
if l == sorted(l):
S.append(s)
S.sort(key=lambda x: x[-1]+x[0])
ans = 0
t = 'a'
for s in S:
if t <= s[0]:
ans += len(s)
t = s[-1]
print(ans)