시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
0.1 초 16 MB 0 0 0 0.000%

문제

Every year, in the middle of summer, a short-stature king, called Statu Palmă Barbă Cot, gives a feast in his castle at which all the knights from the Balkan countries are invited. Făt Frumos is one of the guests, and, like a true knight, he rides to the feast on his fairy horse, named Flămânzilă. Horses are forbidden inside the castle, therefore Făt Frumos intends to tie up Flămânzilă to one of the trees nearby, outside the castle. Flămânzilă is very quiet as long as it has something to eat (its favourite grass grows everywhere), but, after it grazes all the reachable grass, it becomes nervous and begins to blow fire, like a dragon. At such a point, Făt Frumos has to leave the feast in order to calm his quadruped companion.

In order to prevent Flămânzilă from causing a fire, Făt Frumos needs to know the area of the figure within which it can move. The figure is shaped by:

  • the tree to which the horse is tied up (a point of integer coordinates Xc, Yc);
  • the length of the rope L (a positive integer);
  • the wall of the castle that the horse cannot jump over (the wall forms a convex polygon with N edges).

Write a program to calculate the area of the figure within which Flămânzilă can move.

입력

The standard input contains, on the first line, three integers X, Y, and L, separated by a space - the coordinates of the tree to which the horse will be tied up and the length of the rope. The second line contains the positive integer N - the number of vertexes in the polygon. N lines follow, each of them containing two integers Xi , Yi (i = 1, ..., N), separated by a space - the vertexes of the polygon, given clockwise.

Constraints

  • -10000 ≤ Xi, Yi ≤ 10000 (i = 1, ..., N).
  • -10000 ≤ Xc, Yc ≤ 10000.
  • 3 ≤ N ≤ 300.
  • 1 ≤ L ≤ 105.

Subtask

  1. The length of the rope does not exceed the distance from the tree to the wall
  2. The length of the rope does not exceed the half-perimeter of the wall
  3. The length of the rope allows reach all the points on the polygon edges, making a combined cover in two directions: clockwise and anticlockwise. However, each of the invisible vertices of the polygon (a vertex is invisible if the segment joining it with the tree intersects the polygon in an interior point) can be reached from no more than one direction.

출력

The standard output will contain a real number with five decimals - the area of the figure within which Flămânzilă can move.

Note: Results will be evaluated with a precision = 1.0.

예제 입력

3 3 1
4
3 5
6 7
8 5
7 2

예제 출력

3.14159

예제 입력 2

5 5 4
4
4 7
7 9
9 7
8 4

예제 출력 2

36.71737

힌트

Explanation Example 1

Explanation Example 2