#P8000. [WFOI - 01] 循环节(circle)
[WFOI - 01] 循环节(circle)
Background
Setter’s note: これは非常に嫌な質問なので、あまり時間をかけたくない場合は、この質問を見る前に他の質問を終えることをお勧めします。
Problem Description
You are given a set of points on the coordinate plane. You need to find a subset of points and a vector such that $\exist\ z\in N^+,\{b\cup b+x\cup b+2x\cup\dots\cup b+zx=a\}$.
Now you are asked to find any triple , where is the maximum among all triples satisfying the condition, any three points in are not collinear, any four points do not form a trapezoid or a parallelogram, and $b_0\cap b_0+x_0=\varnothing,b_0\cap b_0+2x_0=\varnothing,\dots,b_0\cap b+yx_0=\varnothing|{y\to+\infty}$.
Here, means the set of points obtained by translating every point in by the vector .
Input Format
The first line contains a positive integer .
The next lines each contain integers, representing a point.
Output Format
Output a total of lines:
The first line contains an integer .
The second line contains integers (corresponding indices).
The third line contains two integers .
The fourth line contains an integer .
4
0 0
0 1
1 0
1 1
2
1 3
0 1
1
3
0 0
0 1
1 0
3
1 2 3
0 0
0
Hint
Since the sample explanation would only repeat the statement, and it is believed that if you have reached this problem you should be able to understand its meaning, no sample explanation is provided (actually the setter is lazy).
This problem uses bundled Subtask tests.
| Subtask ID | Constraints and Notes |
|---|---|
| Subtask #0() | ; |
| Subtask #1() | |
| Subtask #2() | |
| Subtask #3() | No special restrictions. |
For of the testdata, , the coordinate range of points is , and the testdata guarantees that a solution exists.
Translated by ChatGPT 5