Author: | B. Vasilyev, A. Klenin | Time limit: | 4 sec | |
Input file: | input.txt | Memory limit: | 200 Mb | |
Output file: | output.txt |
The seashore is represented by a polyline without self-intersections, described by a sequence of vertices (x1,y1),…(xN,yN). It also has a property that xi<xi+1. The sea is above the line, and the beach — below.
Your program must connect two vertices with a straight line not longer than L chosen so as to maximize the beach area enclosed between that line and the shore. The line must not intersect with the sea and may only touch, not intersect, the shore polyline.
No. | Input file (input.txt ) |
Output file (output.txt ) |
---|---|---|
1 |
|
|
2 |
|
|