Amusement Park Adventure
Time limit1sMemory limit1024 MB
Count how many ride minimum heights are at or below Carlitos' height, given N and H and a list of N heights.
- Level
Easy1 of 10
- Topics
- Implementation, Simulation
- Solved
- No attempts yet
Problem
Meet Carlitos, an adventure enthusiast who loves amusement parks. His height may keep him from some rides. Before the weekend, he checks the park brochures for the minimum height of each ride. Help him find how many rides he can go on at a specific park by comparing his height with each ride's minimum height.
Input
The first line contains two integers and (, ), the number of rides in the park and Carlitos' height in centimeters.
The second line contains the minimum heights () of each ride in the park.
Output
Print a single line with an integer, the number of rides Carlitos can go on. A ride is open to him when his height is at least the ride's minimum height.