| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 203 | 145 | 121 | 68.750% |
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$.
3 3 1 7
3 7
6 1 4 3 9 7 11
1 4 9 11
12 0 1 4 4 3 2 3 4 5 5 7 4
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번