In the Shower
Time limit1sMemory limit256 MB
Count, for each test case, how many of the N bottles need more than E attempts and are empty.
- Level
Easy1 of 10
- Topics
- Array
- Solved
- No attempts yet
Problem
Your roommate left a somewhat passive-aggressive post-it note asking how many empty shampoo bottles you really need to keep in the shower. A passive-aggressive post-it note usually starts with a single number , the count of passive-aggressive statements and questions on it, followed by lines. When is 1 that line is normally left out and the whole note is just one statement or question. That is by far the most common case.
Somewhat worn out by your roommate's inability to count, you decide to write a program that any of your roommates can run whenever they wonder how many empty shampoo bottles a happy life here requires. Different roommates have different definitions of empty, so each of them enters that definition before getting an answer.
Input
The first line contains , the number of cases. cases follow.
The first line of each case contains two integers separated by a space: , the number of attempts you may make at extracting a visible amount of shampoo, and , the number of candidate bottles.
Then follow lines, each with a single integer giving how many attempts a particular bottle needed. If the attempt count exceeds , the bottle counts as empty.
- Each attempt count is an integer from 1 to 1000.
Output
For each case, print the number of empty shampoo bottles on its own line.