Logo
(追記) (追記ここまで)

33654번 - Sort of Sort 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB18613310968.553%

문제

Sorting takes so long... but if we don’t mind losing some data we can sort of sort much faster!

A sort of sorted list is a monotonically increasing list containing all elements of another list $a$ that were originally in sorted order. That is, a sort of sorted list obtained from list $a$ contains all $a_i$ such that $a_i≥a_j$ for all 0ドル≤j<i$.

입력

The first line of input contains a single integer $N,ドル the length of the unsorted list (1ドル≤N≤100,000円$). The next line contains $N$ space separated integers $a_i$ ($-200,000円≤a_i≤200,000円$).

출력

Output a single line of space separated integers representing the sort of sorted list obtained from the given list $a$.

제한

예제 입력 1

3
3 1 7

예제 출력 1

3 7

예제 입력 2

6
1 4 3 9 7 11

예제 출력 2

1 4 9 11

예제 입력 3

12
0 1 4 4 3 2 3 4 5 5 7 4

예제 출력 3

0 1 4 4 4 5 5 7

힌트

출처

University > University of Alberta Programming Contest > UAPC 2025 > Division 1 B번

University > University of Alberta Programming Contest > UAPC 2025 > Division 2 D번

  • 문제를 만든 사람: Grayden Price
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /