#d280. 锦标赛
锦标赛
Tournament
Problem Description
There are players in a competition, with ability values .
A total of rounds are held. In each round, among the players still remaining, any two players are chosen. If , then the player with the higher ability value wins and the player with the lower ability value is eliminated. If , then either of the two players may win and the other is eliminated.
After rounds, only one player remains. How many players could possibly be the final winner?
Input Format
The first line contains two integers , the total number of players and the parameter of the winning condition.
The next line contains integers , the ability values of the players.
Output Format
Output one integer: the number of players that could possibly win in the end.
Sample Input
5 3
1 5 9 6 3
Sample Output
5
Constraints
There are test cases in total.
Test point : .
Test point : .
Test points : .
For of the data: , .
Hint
See the accompanying problem materials.