Vampire
Time limit3sMemory limit256 MB
A circular sun of radius r rises from the horizon behind rectangular buildings, and each dataset asks for the last time the whole disk stays hidden.
Problem
At sunrise the sun is a circle of radius . At time its center is at and it moves upward at speed per second. Each building is a rectangle sitting on the horizon. Find the last time when the entire sun lies inside the union of the building silhouettes and the region .
Input
The input has multiple datasets. Each begins with and , followed by lines with . The input ends with .
Output
For each dataset, print the last blocked time to four decimal places with absolute error at most .