시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB69039536156.406%

문제

Colonel Quaritch is playing checkers one day, and decides it would be interesting to write a program to calculate the maximum number of pieces on a single row.

입력

Checkerboards are 8x8 boards with positions between (1,1) and (8,8). The input begins with the number of boards. Each board is on a separate line and begins with the number of pieces, followed by the column and row positions of each piece.

출력

For each checkerboard, your program should output the maximum number pieces on any one row.

출력 형식

정확한 출력 형식은 제출에서 언어를 Java로 설정하면 확인할 수 있다.

예제 입력 1

2
3 1 1 2 6 8 8
4 2 3 1 3 1 4 5 3

예제 출력 1

1
3