#include<bits/stdc++.h>
using namespace std;
#define man 210
int main(void)
{
int n,r[man<<1],c[man];
int T,s,t;
scanf("%d",&T);
for(int i=1;i<=200;i++)
{
r[i<<1]=i;
r[(i<<1)-1]=i;
}
while(T--)
{
memset(c,0,sizeof c);
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
scanf("%d %d",&s,&t);
s=r[s],t=r[t];
int tmp;
if(s>t)
{
tmp=t;
t=s;
s=tmp;
}
for(int i=s;i<=t;i++)
c[i]++;
}
for(int i=1;i<=200;i++)
{
c[0]=max(c[0],c[i]);
}
printf("%d\n",c[0]*10);
}
return 0;
}
hdoj 1050
最新推荐文章于 2021-09-02 16:54:30 发布