The cows are taking a multiple choice test. But instead of a standard test where your selected choices are scored for each question individually and then summed, in this test your selected choices are summed before being scored.
Specifically, you are given
It is guaranteed that the total number of vectors is at most
The first line contains
Each group starts with
The maximum possible squared Euclidean distance.
Subtask # | Score | Constraints |
---|---|---|
1 | 30 | The total number of vectors is at most |
2 | 24 | Every group has size exactly two. |
3 | 46 | No additional constraints |
Sample Input 1 | Sample Output 1 |
3
|
242
|
Subtask | Score |
---|---|
1 | 30 |
2 | 24 |
3 | 46 |