CF604A.Uncowed Forces

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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 . 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.

凯文·孙刚刚完成了 Codeforces 第 334 场比赛!本场竞赛时长为 120 分钟,共包含五道题目,各题目的最高分值分别为 500、1000、1500、2000 和 2500。尽管题目颇具挑战性,凯文毫不畏惧,一路势如破竹地解决了全部题目,从而在波维尼亚(Bovinia)所有奶牛计算机科学家之中脱颖而出,成为最杰出的一位。凯文已知自己每道题的提交时间、每道题的错误提交次数,以及他成功与失败的黑客攻击(hack)总次数。由于 Codeforces 的计分规则较为复杂,凯文希望你编写一个程序来计算他的最终得分。

Codeforces 的得分按如下方式计算:若某题目的最高分值为 x,而凯文在第 m 分钟正确提交了该题,且此前共进行了 w 次错误提交,则他在该题上的得分为 。他的总得分等于其在各题目上得分之和。此外,凯文的总得分还会因每次成功的黑客攻击而增加 100 分,但每次失败的黑客攻击则会使其总得分减少 50 分。

所有算术运算均以绝对精度执行,不进行任何舍入。题目保证凯文的最终得分是一个整数。

输入格式

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.

输入的第一行包含五个用空格分隔的整数 m1m_1, m2m_2, m3m_3, m4m_4, m5m_5,其中 mim_i(0 ≤ mi ≤ 1190 \le m_i \le 119)表示 Kevin 对第 ii 题最后一次提交的时间。他的最后一次提交总是正确的,并被接受。

第二行包含五个用空格分隔的整数 w1w_1, w2w_2, w3w_3, w4w_4, w5w_5,其中 wiw_i(0 ≤ wi ≤ 100 \le w_i \le 10)表示 Kevin 在第 ii 题上的错误提交次数。

最后一行包含两个用空格分隔的整数 hsh_s 和 huh_u(0 ≤ hs, hu ≤ 200 \le h_s, h_u \le 20),分别表示 Kevin 成功和失败的 hack 次数。

输出格式

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

输出一个整数,即凯文的最终得分。

输入输出样例

  • 输入#1

    20 40 60 80 100
    0 1 2 3 4
    1 0

    输出#1

    4900
  • 输入#2

    119 119 119 119 119
    0 0 0 0 0
    10 0

    输出#2

    4930

说明/提示

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

在第二个样例中,Kevin 解决所有题目共花费了 119 分钟。因此,他在每道题上获得的分数为 。所以他通过解题获得的总分为 。再加上通过黑客攻击获得的 10×100=100010 \times 100 = 1000 分,他的总得分变为 3930+1000=49303930 + 1000 = 4930。

输入解题思路,AI测评打分。不知道怎么写?

首页