Ex - Disk and Segments Editorial by evima
Another solution by proposerWe perform a binary search on the answer. The answer is less than or equal to a certain value if and only if the following holds.
- There are \(N\) shapes like the ones shown below, each formed by a rectangle and two semicircles. Is there a point where they all intersect? (The figures below correspond to Sample Input 1 and 2.)
By enumerating all intersections of \(2N\) line segments and \(2N\) circles, and calculating their distances from the \(N\) line segments, you can check this in \(O(N^3)\) time, barely in time.
P.S. I proposed A, B, D, E, and Ex.
posted:
last update: