Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#37 1181 단어 정렬 #37

Open
yongholeeme opened this issue Mar 31, 2019 · 0 comments
Open

#37 1181 단어 정렬 #37

yongholeeme opened this issue Mar 31, 2019 · 0 comments
Labels
6-7주차 19-1 19-1 Problem Solving

Comments

@yongholeeme
Copy link

Problem: 단어 정렬

알파벳 소문자로 이루어진 N개의 단어가 들어오면 아래와 같은 조건에 따라 정렬하는 프로그램을 작성하시오.

  1. 길이가 짧은 것부터
  2. 길이가 같으면 사전 순으로

입력 설명

첫째 줄에 단어의 개수 N이 주어진다. (1≤N≤20,000) 둘째 줄부터 N개의 줄에 걸쳐 알파벳 소문자로 이루어진 단어가 한 줄에 하나씩 주어진다.
주어지는 문자열의 길이는 50을 넘지 않는다.

출력 설명

조건에 따라 정렬하여 단어들을 출력한다.
단, 같은 단어가 여러 번 입력된 경우에는 한 번씩만 출력한다.

입력 및 출력 예제

# 예제 입력1
13
but
i
wont
hesitate
no
more
no
more
it
cannot
wait
im
yours

# 예제 출력1
i
im
it
no
but
more
wait
wont
yours
cannot
hesitate

언어제한

  • C/C++
  • Python3

문제 출처

https://www.acmicpc.net/problem/1181

@yongholeeme yongholeeme added 19-1 19-1 Problem Solving 6-7주차 labels Mar 31, 2019
@yongholeeme yongholeeme changed the title #1181 단어 정렬 #37 1181 단어 정렬 Mar 31, 2019
@yongholeeme yongholeeme added 19-1 19-1 Problem Solving 6-7주차 and removed 19-1 19-1 Problem Solving 6-7주차 labels Mar 31, 2019
yongholeeme pushed a commit that referenced this issue May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6-7주차 19-1 19-1 Problem Solving
Projects
None yet
Development

No branches or pull requests

1 participant