#P7072. Real-time Award Cutoff Score

    ID: 20278 Type: Default 1000ms 256MiB

Real-time Award Cutoff Score

Real-time Award Cutoff Score

In NOI2130, to enhance the competition's excitement, CCF will broadcast the real-time award cutoff score. The award rate is given as (w%), meaning that the planned number of awardees after evaluating (p) contestants is (\max(1, \lfloor p \times \frac{w}{100} \rfloor)). Note that if some contestants have the same score as the cutoff, all of them will be awarded, so the actual number of awardees may exceed the planned amount. Given the scores of (n) contestants, determine the cutoff score, which is the lowest score among those awarded.

The cutoff score is defined as the (k^{th}) highest score (where (k=\max(1, \lfloor n \times \frac{w}{100} \rfloor))) when the scores are sorted in non-increasing order. In case of ties at the boundary, all contestants sharing the cutoff score are considered awardees.

inputFormat

The first line contains two integers (n) and (w) (with (1 \le n \le 10^5) and (1 \le w \le 100)), representing the number of contestants and the awarding percentage respectively. The second line contains (n) integers, where each integer represents a contestant's score.

outputFormat

Output a single integer: the real-time award cutoff score, which is the score of the (k^{th}) highest contestant based on the planned award count.

sample

5 50
60 90 75 90 50
90