#P7918. [Kubic] Lines
[Kubic] Lines
Description
In a 2D Cartesian coordinate system, there are lines. No three lines intersect at one point, and no two lines coincide. Obviously, these lines form at most intersection points. You may choose a subset of these lines. A point is considered covered if and only if at least one of the chosen lines passes through it. Find the minimum number of lines to choose so that all intersection points are covered.
Input Format
The first line contains an integer .
The next lines each contain three integers , describing a line with equation .
Note: the input does not guarantee .
Output Format
Output one line with one integer, representing the answer.
3
1 2 3
4 5 6
7 8 10
2
Hint
For of the testdata, , , and are not both .
| Score | Special Property | ||
|---|---|---|---|
| None | |||
| No special limit | |||
| None |
Sample Explanation
One way is to choose the two lines and .
It can be proven that there is no better solution.
Translated by ChatGPT 5
京公网安备 11011102002149号