Under construction

Still being built. Things may change

Dartboard

Time limit1sMemory limit128 MB

Summary
Given ring radii and Gaussian spread, compute the expected dart score with averaged sector values and triple and double rings.
Level

Medium4 of 10

Topics
Probability, Math
Solved
No attempts yet

Problem

Sanggeun likes playing darts with his friends. He is bad at darts, but he is very good at math. Now he wants to use that math to work out the expected score of a throw.

The probability density that Sanggeun hits a point at distance rr from the center of the board is

f(r)=12πσ2e−r22σ2f(r)=\frac{1}{2 \pi \sigma^{2}}e^{-\frac{r^2}{2 \sigma^2}}

So the probability of hitting a patch of area Δx⋅Δy\Delta x \cdot \Delta y at distance rr from the center is f(r)Δx⋅Δyf(r)\Delta x \cdot \Delta y. Here σ\sigma is the standard deviation, and its value depends on how much Sanggeun has had to drink so far.

The board is split into 20 sectors of equal area, and each sector carries one of the numbers 1 through 20. Going outward from the center, the circles and rings are the bull's eye, the bull ring, the triple ring, and the double ring.

Darts are scored like this.

  • inside the bull's eye: 50 points
  • the bull ring: 25 points
  • each sector: the number written on it
  • a sector hit inside the triple ring: 3 times the sector score
  • a sector hit inside the double ring: 2 times the sector score

A dart landing outside the double ring scores 0.

Input

The first line contains six real numbers. In order, they are the radii of the bull's eye, the bull ring, the inner edge of the triple ring, the outer edge of the triple ring, the inner edge of the double ring, and the outer edge of the double ring, all in centimeters. The six values are given in increasing order.

The second line contains the standard deviation σ\sigma in centimeters.

Every real number lies in the interval [10−3,100][10^{-3}, 100].

Output

Print the expected score of one throw by Sanggeun on the first line.

Round the expected score to six decimal places and print all six digits after the decimal point. If the expected score is exactly 5050, print 50.000000.

Examples3

  1. Example 1

    Input
    1.27 3.1 10.9 11.7 16.2 17.0
    17.0
    
    Expected output
    5.266211
    
  2. Example 2

    Input
    1.27 3.1 10.9 11.7 16.2 17.0
    0.5
    
    Expected output
    49.006900
    
  3. Example 3

    Input
    0.1 0.2 0.3 0.4 99.9 100
    20
    
    Expected output
    10.502837