Lamps
Time limit1sMemory limit512 MB
Add up to K lamps along a ceiling to minimize the total area of the dark triangles between neighboring lamps, and report the minimum as a reduced fraction.
Problem
The architect Ziemobit designed a glass corridor connecting two government offices. Several lamps hang from the corridor's ceiling, and each lamp shines light straight down in a cone with an apex angle of (a triangle seen from the side, spreading to each side of the point directly below the lamp).
Seen from the side, near the ceiling between any two neighboring lamps there is a triangular dark region that neither lamp's light reaches.

The corridor is tall enough that the original lamps already light the entire floor, and there are already lamps at both ends of the corridor (position and position ). So the only dark regions are the triangles between neighboring lamps.

There is budget left to add up to more lamps at any positions on the ceiling. Adding lamps shrinks the dark region. After adding at most lamps, make the total area of the dark region (seen from the side) as small as possible, and report that minimum.
Input
The first line contains three integers , , and (, , ): the number of lamps already hanging, the number of lamps you may add, and the length of the corridor.
The second line contains increasing integers giving the lamp positions. The first is and the last is .
Output
Print the minimum total area of the dark region after adding at most lamps, as a reduced fraction where and are integers with and .