시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB64466.667%

문제

There is an array of $n$ integers. Each element $a_i$ in this array is between $1$ and $k$.

What is the smallest number of elements that should be removed from this array, so that its longest increasing subsequence has length smaller than $k$?

입력

The first line contains two integers $n$ and $k$ ($1 \le n \le 10^6, 1 \le k \le n$) --- the length of the array and the upper bound for its elements.

The second line contains $n$ integers $a_i$ ($1 \le a_i \le k$) --- the elements of the array.

출력

In the first line output an integer $m$ --- the number of elements to remove.

In the second line output $m$ integers --- the indices of the removed elements. The indices are numbered from $1$ to $n$.

예제 입력 1

3 2
1 2 2

예제 출력 1

1
1

예제 입력 2

2 2
2 1

예제 출력 2

0

예제 입력 3

8 3
1 2 2 1 1 3 2 3

예제 출력 3

2
1 7