結果
問題 | No.205 マージして辞書順最小 |
ユーザー |
![]() |
提出日時 | 2023-08-30 08:54:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 329 ms / 5,000 ms |
コード長 | 290 bytes |
コンパイル時間 | 249 ms |
コンパイル使用メモリ | 82,288 KB |
実行使用メモリ | 76,780 KB |
最終ジャッジ日時 | 2025-01-01 18:25:16 |
合計ジャッジ時間 | 2,796 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 15 |
ソースコード
N = int(input()) cnt = 0 S = [] for i in range(N): temp = [ord(s) - ord("a") for s in input()] temp.append(27) S.append(temp) cnt += len(temp) - 1 S.sort() ans = [] for _ in range(cnt): v = S[0].pop(0) ans.append(chr(v + ord("a"))) S.sort() print(*ans, sep="")