Interval Problem
#描述#
We call [a,b] an interval where a < b. we call [a,b] is an nested interval of [c,d] where c < a and b < d.
<br>
<br>
Here comes the problem. You are given N intervals, calculate the number of interval who is a nested interval of another.
#格式#
##输入格式##
Several test case.
Every case, first line an integer N(1<=N<=100000). Then N lines, two integer a,b for each line(0<=a<b<=10^9);
I guarantee that in every test case, there will be no integer appear twice or more.
##输出格式##
The result.
#样例1#
##样例输入1##
1
1 1000000000
2
5 6
2 9
5
1 10
2 9
3 8
4 7
5 6
##样例输出1##
0
1
4
#限制#
1000ms
32768KB
#提示#
#来源#
dd