eolymp
bolt
Попробуйте наш новый интерфейс для отправки задач
Задачи

Dartboard

Dartboard

Лимит времени 1 секунда
Лимит использования памяти 64 MiB

Jaap is playing darts at the local pub with a group of friends. His darts throwing skills are not that great, so he just tries to aim at the center of the dartboard. His mathematical skills are better though, and he wonders what is his expected score for one dart.

After a while Jaap estimates that his darts hit the dartboard (or often miss it) with a probability distribution that depends only on the radius r from the center of the board, and has the Gaussian form

That is, the probability of hitting a small surface area Δx·Δy at a distance r from the center is given by f(r)Δx·Δy. Here denotes the standard deviation, and Jaap found out that this depends strongly on how many beers he has had.

For those not familiar with the game of darts, a dartboard is depicted below. The score for hitting each of the regions of the dartboard is as follows:

  • the inner bull’s eye is worth 50 points;

  • the bull annulus is 25 points;

  • each pie has worth of the respective number 1 up to 20, but

  • the inner triple ring has triple the worth of the pie, while

  • the outer double ring has double the worth.

Finally, if the dart lands outside the double ring, the score is zero. Note that the pies of all numbers have equal area.

Figure 1: A standard dartboard (from Wikimedia, CC BY-SA 3.0 licensed by Tijmen Stam).

Входные данные

The first line contains 6 floating point numbers of strictly increasing size: the radii of the bull’s eye, bull, inner and outer triple ring, and inner and outer double ring, all in centimeters. The second line contains the standard deviation in centimeters as a floating point number. All floating point numbers are in the range [10^{-3}, 100].

Выходные данные

Print the expected score of one dart for Jaap as a floating point number on a single line. The answer should be correct up to either a relative or absolute error of 10^{-4}.

Пример

Входные данные #1
1.27 3.1 10.9 11.7 16.2 17.0
17.0
Выходные данные #1
5.266210658
Источник ACM ICPC NCPC 2013, 5th October 2013