結果
問題 | No.205 マージして辞書順最小 |
ユーザー | yuto_te |
提出日時 | 2019-01-22 14:47:48 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 370 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 10,620 KB |
実行使用メモリ | 7,928 KB |
最終ジャッジ日時 | 2023-10-13 17:41:01 |
合計ジャッジ時間 | 1,221 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 14 ms
7,848 KB |
testcase_01 | AC | 17 ms
7,704 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 13 ms
7,752 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 20 ms
7,884 KB |
testcase_11 | AC | 27 ms
7,900 KB |
testcase_12 | AC | 27 ms
7,724 KB |
testcase_13 | AC | 20 ms
7,716 KB |
testcase_14 | AC | 13 ms
7,872 KB |
testcase_15 | AC | 14 ms
7,864 KB |
testcase_16 | AC | 14 ms
7,908 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
ソースコード
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[0] for w in words) for i,w in enumerate(words): if x == w[0]: words[i].pop(0) if len(words[i]) == 0: del words[i] break t += x print(t)