TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

The PDF file of all problems can be downloaded HERE

Input Format

The first line of the input file contains an integer T (1 <= T <= 50) indicating the number of test cases.

Each test case starts with two positive integers N , D (N*D <=200), which is the number of enemy heroes and the space dimensionality, respectively. Then follows N lines of D integers, each line representing the coordinate of an enemy hero. All numbers in the input has absolute value no more than 10000. Notice that two enemy heroes may have same coordinate.

Output Format

Sample Input 1

2
4 2
0 0
0 1
1 0
1 1
3 2
0 0
3 4
5 5

Sample Output 1

7
4

Hints

Problem Source

Migrated from old NTUJ.

kelvin

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 8000 65536 131072