#p2822. 习题7.6.4 火车统计
习题7.6.4 火车统计
题目描述
自西向东延伸的铁路上坐落着个城市,现有列火车,
给出它们的出发城市 和目标城市 ,
回答次询问,每次询问给出和,输出出发城市序号大于等于且目标城市序号小于等于的火车的数量。
输入格式
Input is given from Standard Input in the following format:
输出格式
Print lines.
The -th line should contain the number of the trains that runs strictly within the section from City to City .
样例数据
2 3 1
1 1
1 2
2 2
1 2
3
10 3 2
1 5
2 8
7 10
1 7
3 10
1
1
10 10 10
1 6
2 9
4 5
4 7
4 7
5 8
6 6
6 7
7 9
10 10
1 8
1 9
1 10
2 8
2 9
2 10
3 8
3 9
3 10
1 10
7
9
10
6
8
9
6
7
8
10
数据规模与约定
-
is an integer between and (inclusive).
-
is an integer between and (inclusive).
-
is an integer between and (inclusive).
-
-
时间限制:
空间限制: