http://acm.hdu.edu.cn/showproblem.php?pid=1050
//找重叠最多的点
#include<string.h>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int T;
int n;
int a,b;
int i,j;
int c[210];
cin>>T;
while(T--)
{
memset(c,0,sizeof(c));
cin>>n;
for(i=1;i<=n;i++)
{
cin>>a>>b;
a=(a+1)/2;//将门口相对房间投射到走廊上,编号为1--200
b=(b+1)/2;
if(a>b)
swap(a,b);//swap()函数交换a,b的数值
for(j=a;j<=b;j++)
{
c[j]++;
}
}
sort(c+1,c+201);//找重叠最多的点 c[1]--c[200]
cout<<c[200]*10<<endl;
}
return 0;
}