Solved by 61 users: ...
UserDateAttemptTimeCMSC
ripatti`25 jul 2010`C++1700.01662
ripatti`25 jul 2010`C++1800.01665
tomek`12 apr 2006`C++600.01787
Mishunin_Alexander`22 oct 2007`C++600.02842
ripatti`25 jul 2010`C++1600.01860
ilia`09 jul 2014`C++300.02885
Vyshnya`07 jan 2010`C++1300.01890
RAVEman`24 jan 2008`C++1600.01890
RAVEman`24 jan 2008`C++1500.01891
WsemirZ`02 aug 2008`Kylix600.01905
WsemirZ`02 aug 2008`Kylix700.01906
WsemirZ`02 aug 2008`Kylix500.01907
Tulegenov_Amir`11 aug 2007`Kylix400.01909
Slam`11 mar 2005`C++800.02914
WsemirZ`02 aug 2008`Kylix400.01923
grom`16 oct 2004`FPC200.01929
WsemirZ`02 aug 2008`Kylix300.01929
 C++ 33 FPC 19 Kylix 9 C 1
` >  >  >  >  >  >  >  >  >  > `

## Rain

Time limit = 5

It is raining in one of the two-dimantional worlds. Relief is described by N-points polygon: (x0, y0), ..., (xN, yN), where x0 < x1 < ... < xN and yiyj for any i,j, ij.

In x0 and xN there are very high vertical walls.

If relief is plain, than depth of resulted pond is H.

But our relief is not plain, and there may be several ponds. Your program should calculate maximum water-depth in the ponds.

Input In the first line N and H are given. N is positive integer, (0 ≤ N ≤ 100) and H is real(floating-point number) (0 ≤ H ≤ 109). Next (N+1) lines describe the polygon. Each line contains two numbers xi and yi, -10000 ≤ xi, yi ≤ 10000 (0 ≤ iN), delimited with space.

Output One floating-point number with accuracy 0.0001.

 Input#1```7 7.000 -5 10 -3 4 -1 6 1 -4 4 17 5 3 9 5 12 15 ``` Output#1```15.8446 ```

Author: