Kupus
Mirko has decided to grow cabbage on the roof of his building. To water the cabbage he will place N identical sprinklers, each watering a circular region with radius 1. The roof of the building is rectangular, X units long and Y units wide, so it can be modeled by a rectangle in the coordinate plane with sides parallel to the axes and corners in points (0, 0) and (X, Y). Because the pipes are laid out in a perfect grid, all sprinklers are located in points with integer coordinates. Write a program that, given the coordinates of all sprinklers, determines the total area of the roof covered by the sprinklers.
Input
4 5
2
0 0
4 4 Output
2.356194 Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.