Water Glass

Time Limit: 2 Seconds
Memory Limit: 65536 KB

Steve is a glass blower. He has an order to make water glass (clocks) from
one very eccentric lady. Because that person is eccentric she does not want
her water glass have usual form. Instead she would like one made of two symmetric
prisms based on some polygon. Of course that polygon has a base side the glass
should stand on and single vertex the water should flow through. As a good professional
Steve has made what he has been asked for but he has difficulties to calculate
where the time measures should be marked. Assume the water is flowing evenly
through the hole, the upper prism is full with the water in the initial time,
all the water completely flows into the lower prism in exactly 24 hours. You
are to write program that being given the form of the polygon calculates the
water level in the lower prism each half-hour period starting from initial time.

**This problem contains multiple test cases!**

The first line of a multiple input is an integer N, then a blank line followed
by N input blocks. Each input block is in the format indicated in the problem
description. There is a blank line between input blocks.

The output format consists of N output blocks. There is a blank line between
output blocks.

** Input**

Input starts with a single line containing 3 <= N <= 20 - number of vertices
in the polygon. Next N lines each contain 2 integers -50 <= xi <= 50 and
0 <= yi <= 50 - coordinates of ith vertex. Note that x1, y1 are coordinates
of the vertex the water would flow through. You can assume the following conditions
are true: if (xk, yk), (xk+1, yk+1) - coordinates of the vertices that form
the glass base then

1. yk = yk+1 = 0

2. For all 1 < i < k, yi < yi-1

3. For all k+1 < i < N, yi+1 > yi

**Output**

Output should contain 48 lines in the format presented in a sample (exactly
three digits after the decimal point should be printed).

**Sample Input**

1

3

10 20

0 0

20 0

**Sample Output**

00:00 0.000

00:30 0.209

01:00 0.421

01:30 0.635

02:00 0.851

02:30 1.070

03:00 1.292

03:30 1.516

04:00 1.743

04:30 1.972

05:00 2.205

05:30 2.441

06:00 2.679

06:30 2.922

07:00 3.167

07:30 3.417

08:00 3.670

08:30 3.927

09:00 4.189

09:30 4.454

10:00 4.725

10:30 5.000

11:00 5.280

11:30 5.566

12:00 5.858

12:30 6.156

13:00 6.460

13:30 6.771

14:00 7.090

14:30 7.417

15:00 7.753

15:30 8.098

16:00 8.453

16:30 8.820

17:00 9.199

17:30 9.592

18:00 10.000

18:30 10.426

19:00 10.871

19:30 11.340

20:00 11.835

20:30 12.362

21:00 12.929

21:30 13.545

22:00 14.226

22:30 15.000

23:00 15.918

23:30 17.113

Submit
Status