Farmer John has just arranged his NN haybales (1≤N≤100,0001≤N≤100,000) at various points along t
he one-dimensional road running across his farm. To make sure they are spaced out appropriately, ple
ase help him answer QQ queries (1≤Q≤100,0001≤Q≤100,000), each asking for the number of haybales
within a specific interval along the road.
给出N(1≤N≤100,000)个数,和 Q(1≤Q≤100,000)个询问。每个询问包含两个整数A,B(0≤A≤B≤1,000,00
0,000)。对于每个询问,给出数值在A到B间的数有多少个(包含A与B)。