#include <stdio.h>
#include <string.h>
#include <stdlib.h>
//直接暴力找出重叠的最多次数
int main()
{
int t, n, a[201], i, x, y,temp, max;
scanf("%d", &t);
while(t--)
{
memset(a, 0, sizeof(a));
max=0;
scanf("%d", &n);
while(n--)
{
scanf("%d%d", &x, &y);
if(x>y)
{
temp=x;
x=y;
y=temp;
}
x = (x + 1) / 2; //将房间编号处理一下,相对的房间编号合并到一组
y = (y + 1) / 2;
for(i=x; i<=y; i++)
a[i]++;
}
for(i=1;i<=200; i++)
if(a[i]>max)
max=a[i];
printf("%d\n", max*10);
}
return 0;
}
zoj 1029 Moving Tables 【水~】
最新推荐文章于 2019-10-29 19:43:37 发布