結果
| 問題 |
No.205 マージして辞書順最小
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-22 14:55:33 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 93 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-15 13:33:46 |
| 合計ジャッジ時間 | 1,481 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 7 WA * 8 |
ソースコード
n = int(input())
length = 0
words = []
for _ in range(n):
s = input()
length += len(s)
words.append(list(s))
t = ""
for _ in range(length):
x = min(w for w in words)
s = ""
for i,w in enumerate(words):
if x == w:
s = words[i].pop(0)
if len(words[i]) == 0:
del words[i]
break
t += s
print(t)