#include <stdio.h> #include <string.h> #include <conio.h> #define N 205
void swap(int &a, int &b) { int t; t = a; a = b; b = t; } int main() { int i, j; int t, n, from, to, max, min; int rooms[N];
freopen("in.txt", "r", stdin); scanf("%d", &t); while(t--) { scanf("%d", &n); memset(rooms, 0, sizeof(rooms));
for(i=0; i<n; i++) { scanf("%d%d", &from, &to); if(from > to) swap(from, to); from = (from+1) / 2; to = (to+1)/2; for(j=from; j<=to; j++) rooms[j]++; } min = 0; for(i=1; i<N; i++) { if(rooms[i] >= min) min = rooms[i]; } printf("%d\n", min*10); }
getch(); return 0; }
|