Grven N integral points on plane, you are going to find a maximum matching which consists of edges with at most two kinds of lengths.

Server Time(GMT+8)

2018/11/15 14:31:43

2018/11/15 14:31:43

Submitted: 9 Accepted: 1

[Submit][Status][Web Board]

Grven N integral points on plane, you are going to find a maximum matching which consists of edges with at most two kinds of lengths.

There are multiple test cases. The first integer T is the number of cases.

In each case, the first line contains one positive integer(1 ≤ N ≤ 50), the number of points. N parirs of integers follows, indicating the coordinates of the points.

The output should contain T lines. Each line contains the size of maximum matching.

```
1
14
0 2 0 5 0 6 1 3 2 0 2 4 2 6 3 0 3 2 4 0 4 4 5 1 6 5 6 6
```

`7`

this is one of the solutions of sample data.

Wuhan University of Science and Technology Online Judge 2.0

Copyright © 2012-2016 WUST ACM CLUB. All Rights Reserved.

Based On HUSTOJ Open Source Project

Designer & Developer : Bob Lee | ChengBo Meng | Faith