#abc106d. [abc106_d]AtCoder Express 2
[abc106_d]AtCoder Express 2
Problem Statement
In Takahashi Kingdom, there is a east-west railroad and cities along it, numbered , , , ..., from west to east. A company called AtCoder Express possesses trains, and the train runs from City to City (it is possible that ). Takahashi the king is interested in the following matters:
- The number of the trains that runs strictly within the section from City to City , that is, the number of trains such that and .
Although he is genius, this is too much data to process by himself. Find the answer for each of these queries to help him.
Constraints
- is an integer between and (inclusive).
- is an integer between and (inclusive).
- is an integer between and (inclusive).
Input
Input is given from Standard Input in the following format:
Output
Print lines. The -th line should contain the number of the trains that runs strictly within the section from City to City .
Sample Input 1
Sample Output 1
As all the trains runs within the section from City to City , the answer to the only query is .
Sample Input 2
Sample Output 2
The first query is on the section from City to . There is only one train that runs strictly within that section: Train . The second query is on the section from City to . There is only one train that runs strictly within that section: Train .