Codeforces Round 334 (Div. 2)
A
Uncowed Forces
Codeforces
1000
原题
←B →
翻译中…

Kevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and featured five problems with maximum point values of 500, 1000, 1500, 2000, and 2500, respectively. Despite the challenging tasks, Kevin was uncowed and bulldozed through all of them, distinguishing himself from the herd as the best cowmputer scientist in all of Bovinia. Kevin knows his submission time for each problem, the number of wrong submissions that he made on each problem, and his total numbers of successful and unsuccessful hacks. Because Codeforces scoring is complicated, Kevin wants you to write a program to compute his final score.

翻译中…

Codeforces scores are computed as follows: If the maximum point value of a problem is $*x*$, and Kevin submitted correctly at minute $*m*$ but made $*w*$ wrong submissions, then his score on that problem is image. His total score is equal to the sum of his scores for each problem. In addition, Kevin's total score gets increased by $100$ points for each successful hack, but gets decreased by $50$ points for each unsuccessful hack.

翻译中…

All arithmetic operations are performed with absolute precision and no rounding. It is guaranteed that Kevin's final score is an integer.

翻译中…

Input

翻译中…

The first line of the input contains five space-separated integers $*m*_{1}$, $*m*_{2}$, $*m*_{3}$, $*m*_{4}$, $*m*_{5}$, where $*m*_{*i*}$ ($0 ≤ *m*_{*i*} ≤ 119$) is the time of Kevin's last submission for problem $*i*$. His last submission is always correct and gets accepted.

翻译中…

The second line contains five space-separated integers $*w*_{1}$, $*w*_{2}$, $*w*_{3}$, $*w*_{4}$, $*w*_{5}$, where $*w*_{*i*}$ ($0 ≤ *w*_{*i*} ≤ 10$) is Kevin's number of wrong submissions on problem $*i*$.

翻译中…

The last line contains two space-separated integers $*h*_{*s*}$ and $*h*_{*u*}$ ($0 ≤ *h*_{*s*}, *h*_{*u*} ≤ 20$), denoting the Kevin's numbers of successful and unsuccessful hacks, respectively.

翻译中…

Output

翻译中…

Print a single integer, the value of Kevin's final score.

翻译中…

Note

翻译中…

In the second sample, Kevin takes $119$ minutes on all of the problems. Therefore, he gets image of the points on each problem. So his score from solving problems is image. Adding in $10·100 = 1000$ points from hacks, his total score becomes $3930 + 1000 = 4930$.

翻译中…

样例

Input #1
20 40 60 80 100
0 1 2 3 4
1 0
Output #1
4900
InputCopy OutputCopy
Input #2
119 119 119 119 119
0 0 0 0 0
10 0
Output #2
4930
InputCopy OutputCopy
题目信息
题号
604A
时间限制
1 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。