#P6027. 轴对称
轴对称
Description
Little W thinks axial symmetry transformations are really fun, so he randomly picked points on the plane, and then performed a series of axial symmetry transformations to obtain points , where becomes , and so on.
However, he suddenly forgot how he transformed them, so he asks you to help him find a valid sequence of transformations with as few steps as possible.
Input Format
The first line contains an integer , the number of points.
The next lines, line contains two real numbers , representing the - and -coordinates of .
The next lines, line contains two real numbers , representing the - and -coordinates of .
Output Format
The first line contains an integer , the minimum number of steps.
The next lines, line contains three real numbers , indicating that the axis of the -th axial symmetry transformation is the line .
2
1.000000 1.000000
2.000000 2.000000
4.000000 4.000000
3.000000 3.000000
1
1.000000 1.000000 -5.000000
Hint
Sample Explanation

Hint
For the line , if is non-zero, then it is the graph of the linear function ; otherwise, it represents a line perpendicular to the -axis, namely .
This problem uses an . For some reason, this problem does not provide the to contestants.
For each test case, if your is correct, you will get of the score.
Next, we will apply your axial symmetry transformations to respectively, and let the resulting point of be . If for all , the absolute differences between the coordinates of and are both no more than , then you will get of the score.
If you only want to output , please also output some arbitrary values afterwards to avoid .
Constraints
| Test Point ID | Number of folds used when constructing the testdata | |
|---|---|---|
| 1,2 | ||
| 3,4 | ||
| 5,6 | ||
| 7,8,9,10 |
For all data, , .
All data points have been verified by the and are correct.
Please ensure that all in your output satisfy .
Translated by ChatGPT 5
京公网安备 11011102002149号