시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
3 초 (추가 시간 없음) | 1024 MB | 130 | 40 | 30 | 32.967% |
You are given a permutation of size $N$. For each $i$, print the number of indices $j \neq i$, which when removed, decreases the maximum possible length of an increasing subsequence that contains index $i$.
The first line contains an integer $N$.
The next line contains $N$ integers $A_1, A_2, \cdots, A_N$.
Print $N$ integers, separated by spaces, denoting the answers for $i = 1, 2, 3, \cdots, N$.
This subtask has an additional constraint:
This subtask has an additional constraint:
This subtask has no additional constraints.
1 1
0
6 1 2 3 4 5 6
5 5 5 5 5 5
6 6 5 4 3 2 1
0 0 0 0 0 0
4 2 1 4 3
0 0 0 0
9 1 2 3 6 5 4 7 8 9
5 5 5 6 6 6 5 5 5
University > KAIST > 2019 KAIST RUN Spring Contest G번
Contest > Open Cup > 2018/2019 Season > Stage 19: Grand Prix of Daejeon I번