
After an exhausting day of preparing COCI, after sleeping for only three hours and in intervals of 20 minutes, and finally after naughty Patrick and Josip got on his nerves, Vito fell asleep.
Vito was always a pacifist and as a sign of his resignation in front of the disobedience
of his (un)reliable friends, Vito dreamed of
Now awake, he decided he shall fight on the beaches and never surrender! He rushed to the nearest paint
shop so that the next time he dreams of the
Input Specification
The first line contains the integers
In the next line there are
Output Specification
In the only line, output the maximum possible sum of areas of the flags. Your solution will be considered
correct if the absolute or relative error is smaller than
Constraints
Subtask | Points | Constraints |
---|---|---|
1 | 41 | |
2 | 22 | |
3 | 47 | No additional constraints. |
Sample Input 1
2 3
4 5
Sample Output 1
6.5200982141
Sample Input 2
1 6
10
Sample Output 2
24.0000000000
Explanation for Sample 2
The largest possible area is achieved by a flag with sides
Sample Input 3
4 7
5 5 6 6
Sample Output 3
18.5706715170
Comments