結果
問題 |
No.205 マージして辞書順最小
|
ユーザー |
|
提出日時 | 2022-07-06 07:45:52 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 211 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 82,260 KB |
実行使用メモリ | 76,612 KB |
最終ジャッジ日時 | 2024-12-18 02:03:58 |
合計ジャッジ時間 | 2,015 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 7 WA * 8 |
ソースコード
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="")