Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Problem type

You are in charge of all of a certain country's radio broadcasts. At time 0, you send outgoing radio waves to N (1 \le N \le 1\,000) receivers, and whenever a wave meets a receiver, the receiver immediately sends the wave back to you. If the waves travel at the same speed, which incoming radio waves will arrive between time S and time T (1 \le S \le T \le 10\,000), inclusive?

Input Specification

On one line, N, S and T, separated by single spaces followed by N separate lines, each representing the time a radio wave meets a receiver. The times will be positive integers no greater than 10\,000.

Output Specification

The number of radio waves that made it back between time S and time T.

Sample Input

3 2 4

Sample Output



Only the first two radio waves make it back, at times of exactly 2 and 4.


There are no comments at the moment.