QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 256 MB Total points: 10

#10667. The Goat [A]

الإحصائيات

Farmer Byteman took his sledgehammer and drove $ n $ stakes into the ground of an infinite pasture. Through the next $ k $ days each morning farmer Byteman takes his goat out to the pasture and ties it to a randomly selected stake with a cord of length $ l $. During the day the goat eats all the grass in its reach. To the chargin of the goat the grass does not grow back. Moreover, it can happen that the scatterbrained farmer will tie the goat more than once to the same stake.

What is the expected value of the area of the pasture on which the grass will be eaten after $ k $ days?

Input Format

In the first line of the standard input contains three integers $ n $, $ k $ and $ l $ (1 ≤ $ n $, $ k $, $ l $ ≤ 1 000) denoting respectively the number of stakes, the number of days, and the length of the cord. Each of the next $ n $ lines contains the coordinates of one stake in the form of a pair of integers $ x_{i} $, $ y_{i} $ (-1 000 ≤ $ x_{i} $, $ y_{i} $ ≤ 1 000). No two stakes are driven into the ground in the same place.

Output Format

In the only line of the standard output a single real number should be written. The number should be the expected value of the area of the part of the pasture from which the goat will have eaten the grass during $ k $ days. The answer will be accepted if it will differ from the correct answer by no more than $10^{-6}$. No more than 20 digits should be given after the decimal point.

Example

Input

2 2 1
0 0
1 0

Output

4.098204131080311

Notes

If the goat will be tied to the same stake during both days the area of the eaten grass will be equal to π. On the other hand if it will be tied to two different stakes, the area will be equal to 4π/3 + √3/2. Thus the answer is 7π/6 + √3/4.

About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.