結果

問題 No.205 マージして辞書順最小
ユーザー 👑 rin204rin204
提出日時 2022-07-06 07:45:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 78,420 KB
最終ジャッジ日時 2023-08-22 23:20:35
合計ジャッジ時間 3,226 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,324 KB
testcase_01 AC 72 ms
71,400 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 70 ms
71,084 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 101 ms
77,828 KB
testcase_11 AC 117 ms
78,420 KB
testcase_12 WA -
testcase_13 AC 110 ms
77,892 KB
testcase_14 AC 71 ms
71,480 KB
testcase_15 AC 70 ms
71,420 KB
testcase_16 AC 70 ms
71,260 KB
testcase_17 AC 70 ms
71,264 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import *

n = int(input())
hq = [input() for _ in range(n)]
heapify(hq)
ans = []
while hq:
    S = heappop(hq)
    ans.append(S[0])
    S = S[1:]
    if S:
        heappush(hq, S)
print(*ans, sep="")
0