[백준 1181번] 단어정렬
2020. 7. 9. 15:52ㆍAlgorithm/practice
https://www.acmicpc.net/problem/1181
wordDict = {}
for _ in range(int(input())):
word = input()
if word not in wordDict.values():
if len(word) not in wordDict.keys():
wordDict[len(word)] = {word}
else:
wordDict[len(word)].add(word)
for key, value in wordDict.items():
wordDict[key] = sorted(list(value))
for idx, words in sorted(wordDict.items()):
for word in words:
print(word)
'Algorithm > practice' 카테고리의 다른 글
[백준 2805번] 나무 자르기 (0) | 2020.07.22 |
---|---|
[백준 11005번] 진법변환2 (0) | 2020.07.10 |
[백준 2446번] 별찍기-2446 (0) | 2020.07.08 |
[백준 2523번] 별찍기-13 (0) | 2020.07.08 |
[백준 1110번] 더하기 사이클 (0) | 2020.07.08 |