Maimai DX 2077
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

dXqwq likes playing maimai DX UNiVERSE PLUS, since he can't fly to Japan and SEGA completely ignores the feelings of Chinese players, he can only play maimai DX 2077.

In maimai DX 2077, you need to press the button or touch the screen when NOTE appears. There are 4 types of NOTE: TAP, HOLD, SLIDE, and BREAK. There are also 5 judgments for each NOTE: CRITICAL PERFECT, PERFECT, GREAT, GOOD, and MISS.

For each type of NOTE, you can get some standard points according to the judgment. For BREAK NOTEs, you can get some extra points according to the judgment.

Here is the table of standard points:



Here is the table of extra points:



Let A,B be the standard points and extra points you will have if you get CRITICAL PERFECT on every NOTE, and A_0,B_0 be the standard points and extra points you have, the achievement score for this track is defined as .

You are given the number of NOTEs for each type and each judgment, and calculate the achievement score.

输入描述:

There are 4 lines in a test, each line denotes a type of NOTE: TAP, HOLD, SLIDE and BREAK.

The i-th line contains 5 integers (), each integer denotes a type of judgment: CRITICAL PERFECT, PERFECT, GREAT, GOOD, and MISS.

It's guaranteed that there is at least one BREAK note.

输出描述:

Print the percentage of the achievement score in a line. Your answer will be considered correct if the absolute or relative error between yours and the standard answer is no more than . Formally, let your answer be a and the jury's answer be b, and then your answer is considered correct if .
示例1

输入

复制
311 131 24 1 2
48 20 4 0 0
36 0 0 1 0
35 15 1 0 0

输出

复制
99.523505378
示例2

输入

复制
224 133 15 0 0
45 14 0 0 0
57 0 2 1 0
15 16 0 0 0

输出

复制
100.051026393
示例3

输入

复制
324 210 26 2 2
13 14 1 0 0
102 0 3 3 0
9 4 0 0 0

输出

复制
99.369444233

备注:

Noticed that the rules of  are different from .