#P3562. [POI 2013] LAS-Laser
[POI 2013] LAS-Laser
Description
There are some line segments in the plane. You may shoot at most rays starting from the origin to intersect as many segments as possible, and each segment may be counted at most once.
Find the maximum number of segments that can be intersected.
Input Format
The first line contains two integers , , where is the number of segments.
Then lines follow, each containing four integers describing a segment.
Output Format
Output a single integer, the maximum number of segments that can be intersected.
3 6
1 2 2 4
3 1 5 1
3 2 2 3
3 3 3 4
2 2 2 2
6 1 3 5
5
Hint
For of the testdata, , , .
Translated by ChatGPT 5
京公网安备 11011102002149号