Building Bombing

아직 제출이 없습니다시간 제한3초메모리 제한1024 MB

문제

KAIST has a series of NN buildings in a row, numbered from 11 to NN, from left to right. Building ii has a height of h_ih\_i. Building ii is visible from the left if and only if every building on its left has a height strictly less than h_ih\_i.

Your lab is located in building number LL. Since your favorite number is KK, you want to make your lab building the KK-th tallest building visible from the left. To achieve your goal, you will blow up some of the buildings.

For example, suppose there are N=7N=7 buildings in a row and their heights are \[10,30,90,40,60,60,80]\[10,30,90,40,60,60,80]. Your lab is located at building number L=2L=2 and your favorite number is K=3K=3. After blowing up buildings 33 and 77, the buildings visible from the left will be buildings 11, 22, 44, and 55. Then your lab becomes the 33rd tallest building visible from the left, as desired.

What is the minimum number of buildings to blow up to make your lab building the KK-th tallest building visible from the left?

입력

The first line contains three space-separated integers NN, LL, and KK.

The second line contains NN space-separated integers h_1,,h_Nh\_1,\dots ,h\_N.

출력

Output the minimum number of buildings to blow up to make your lab building the KK-th tallest building visible from the left. If it is impossible to do so, output 1-1 instead.

제한

  • 1LN100,0001\le L\le N\le 100\\, 000
  • 1K101\le K\le 10
  • 1h_i1091\le h\_i\le 10^9 (1iN)(1\le i\le N)