## Pulse

View as PDF

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

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

You are in charge of all of a certain country's radio broadcasts. At time 0, you send outgoing radio waves to () 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 and time (), inclusive?

#### Input Specification

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

#### Output Specification

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

#### Sample Input

3 2 4
1
2
4

#### Sample Output

2

#### Explanation

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