| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 1024 MB (추가 메모리 없음) | 161 | 26 | 24 | 18.605% |
You are given a set $S=\{(a_1,b_1) ,(a_2,b_2) ,\dots ,(a_n,b_n)\}$ of $n$ points in the plane. All coordinates of $S$ are integers.
A set $T=\{(c_1,d_1) ,(c_2,d_2) ,\dots ,(c_m,d_m)\}$ of $m$ 2-dimensional vectors is called a good set of $S$ if it satisfies the following:
Find any good set of minimum size.
The input consists of multiple test cases. The first line contains an integer $Q$ — the number of test cases. The description of the test cases follows. For each test case:
For each test case:
If there are multiple solutions, print any of them.
It can be proved that, under the constraints of this problem, a good set of $S$ with size at most 10ドル\times n$ always exists.
2 2 -30 30 -50 50 3 2 1 1 0 4 1
1 -10 10 2 1 0 1 1
In the first test case, $T=\{(-10,10)\}$ is a minimum-size good set of $S=\{(-30,30) ,(-50,50)\}$.
We can take a sequence $((0,0) ,(-10,10) ,(-20,20) ,\underline{(-30,30)} ,(-40,40) ,\underline{(-50,50)})$. Here, the underlined points are in $S$.
In the second test case, $T=\{(1,0) ,(1,1)\}$ is a minimum-size good set of $S=\{(2,1) ,(1,0) ,(4,1)\}$.
We can take a sequence $((0,0) ,\underline{(1,0)} ,\underline{(2,1)} ,(3,1) ,\underline{(4,1)})$.
University > KAIST > KAIST ICPC Mock Competition > 2024 KAIST 14th ICPC Mock Competition J번