結果
| 問題 | No.1512 作文 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-22 11:36:58 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 269 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 37,400 KB |
| 最終ジャッジ日時 | 2026-09-13 04:18:44 |
| 合計ジャッジ時間 | 6,436 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 34 WA * 4 |
ソースコード
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], -len(x)))
ans = 0
t = 'a'
for s in S:
if t <= s[0]:
ans += len(s)
t = s[-1]
print(ans)