A. Uncowed Forces
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

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.

Input

The first line of the input contains five space-separated integers m1, m2, m3, m4, m5, where mi (0 ≤ mi ≤ 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 w1, w2, w3, w4, w5, where wi (0 ≤ wi ≤ 10) is Kevin's number of wrong submissions on problem i.

The last line contains two space-separated integers hs and hu (0 ≤ hs, hu ≤ 20), denoting the Kevin's numbers of successful and unsuccessful hacks, respectively.

Output

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

Sample test(s)
input
  1. 20 40 60 80 100
    0 1 2 3 4
    1 0
output
  1. 4900
input
  1. 119 119 119 119 119
    0 0 0 0 0
    10 0
output
  1. 4930
Note

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 = 1000points from hacks, his total score becomes 3930 + 1000 = 4930.

模拟题,按照题意来就可以,不过注意下精度,因为看到学长多次错在第六组数据上面

  1. #include<stdio.h>
  2. //#include<bits/stdc++.h>
  3. #include<string.h>
  4. #include<iostream>
  5. #include<math.h>
  6. #include<sstream>
  7. #include<set>
  8. #include<queue>
  9. #include<map>
  10. #include<vector>
  11. #include<algorithm>
  12. #include<limits.h>
  13. #define inf 0x3fffffff
  14. #define INF 0x3f3f3f3f
  15. #define lson l,m,rt<<1
  16. #define rson m+1,r,rt<<1|1
  17. #define LL long long
  18. #define ULL unsigned long long
  19. using namespace std;
  20. int a[100000];
  21. int n,m;
  22. int i,j;
  23. double t,ans,num,sum,flag;
  24. int main()
  25. {
  26. double m1,m2,m3,m4,m5;
  27. double w1,w2,w3,w4,w5;
  28. double num1,num2;
  29. cin>>m1>>m2>>m3>>m4>>m5;
  30. cin>>w1>>w2>>w3>>w4>>w5;
  31. cin>>num1>>num2;
  32. sum=0;
  33. sum=max(0.3*500,(double)(1-m1/250*1.0)*500-50*w1*1.0)+max(0.3*1000,(double)(1-m2/250*1.0)*1000-50*w2*1.0)+max(0.3*1500,(double)(1-m3/250*1.0)*1500-50*w3*1.0)+max(0.3*2000,(double)(1-m4/250*1.0)*2000-50*w4*1.0)+max(0.3*2500,(double)(1-m5/250*1.0)*2500-50*w5*1.0);
  34. // cout<<sum<<endl;
  35. sum+=num1*100-num2*50;
  36. cout<<(int)sum<<endl;
  37. return 0;
  38. }

  

Codeforces Round #334(div.2) A的更多相关文章

  1. Codeforces Round #334(div.2)(新增不用二分代码) B

    B. More Cowbell time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...

  2. Codeforces Round #581(Div. 2)

    Codeforces Round #581(Div. 2) CF 1204 A. BowWow and the Timetable 题解:发现,$4$的幂次的二进制就是一个$1$后面跟偶数个$0$. ...

  3. codeforces Round #389(Div.2)C Santa Claus and Robot(思维题)

    题目链接:http://codeforces.com/contest/752/problem/C 题意:给出一系列机器人的行动方向(机器人会走任意一条最短路径),问最少标记几个点能让机器人按这个 路径 ...

  4. Codeforces Round #626 (Div. 2) B. Count Subrectangles

    题目连接:https://codeforces.com/contest/1323/problem/B 题意:给一个大小为n的a数组,一个大小为m的b数组,c数组是二维数组c[i][j]=a[i]*b[ ...

  5. Codeforces Round #342 (Div 2) 解题报告

    除夕夜之有生之年CF第一场 下午从奶奶家回到姥姥家,一看还有些时间,先吃点水果陪姥姥姥爷聊了会儿,再一看表,5:20....woc已经开场20分钟了...于是抓紧时间乱搞.. **A. Guest F ...

  6. Codeforces Round 1153(div. 2)

    这场奇差.ABCD四题.179名. 但是E在现场有213个人做出. 描述一下我在35分钟做完D后的心路历程. 首先看到这道E,第一下想到的是把所有的横向和竖向的整列(行)求出相连的个数. 然后想如何能 ...

  7. Codeforces Round #345 (Div 2)

    最后两题是orzCJK学长帮忙代打的,不过总算是到蓝名了(上次睡迟了,只剩半个小时,结果作大死点开题目看,结果rating掉了100多),还有论代码风格的重要性!!!(没写空格被学长各种D) A题 题 ...

  8. Codeforces Round #622(Div 2)C2. Skyscrapers (hard version)

    题目链接 : C2. Skyscrapers (hard version) 题目描述 : 与上一道题类似,只是数据范围变大, 5e5, 如果用我们原来的方法,铁定是超时的. 考察点 : 单调栈,贪心, ...

  9. Codeforces Round #556(Div.1)

    A 容易发现i,i+1至少有一个数出现,于是可以让尽量多的2和奇数出现 #include<bits/stdc++.h> using namespace std; int n,s1,s2; ...

随机推荐

  1. mahout in Action2.2-给用户推荐图书(1)-直观分析和代码

    This chapter covers  What recommenders are, within Mahout  A first look at a recommender in action ...

  2. ListView里面adapter的不同分类的item

    public class PlayAdapter extends BaseAdapter { /** * 标题的item */ public static final int ITEM_TITLE = ...

  3. Spring_01 spring容器、控制反转(IOC)、依赖注入(DI)

    目录 1 什么是spring框架 2 spring框架的特点 3 spring容器 3.1 什么是spring容器 3.2 spring容器创建对象的编程步骤 3.4 spring容器创建对象的方式 ...

  4. eclipse中安装git插件

    1 安装及配置git插件,问度娘即可 点击前往 2 eclipse 中怎么同步到 本地git仓库 和 码云远程仓库 点击前往

  5. GCD 学习(三)Main&Global Dispatch Queue

    摘录自:http://zhuyanfeng.com/archives/3066 Main Dispatch Queue是在主线程中执行任务的Dispatch Queue.因为主线程只有1个,所以Mai ...

  6. PossibleOrders TopCoder - 1643

    传送门 分析 先用并查集将所有相等元素连为一个,得到不同的元素共cnt种,之后我们的任务便转化为将这些元素分为k组(k≤cnt),所以我们不难得出dp式:dpij=dpi-1j-1*j+dpi-1j* ...

  7. 第一篇:Django基础

    Django框架第一篇基础 一个小问题: 什么是根目录:就是没有路径,只有域名..url(r'^$') 补充一张关于wsgiref模块的图片 一.MTV模型 Django的MTV分别代表: Model ...

  8. Redis实现用户关注功能

    最近项目要涉及到粉丝关注问题,权衡再三还是使用Redis实现比较方便,使用Redis的有序集合可以做到根据关注的时间有序的取出列表,假设我的ID是me,别人的ID是other. 1. 添加关注 添加关 ...

  9. GridView内按钮Click获取记录主键值 在GridView控件中,每行记录内会放置一个铵钮,当用

    在GridView控件中,每行记录内会放置一个铵钮,当用户点击这个铵钮时,获取当笔记录的主键值.可看演示(是一个gif动画,重新播放尝试刷新网页): 实现这个功能,你需要为GridView控件设置Da ...

  10. 通过委托更新UI(异步加载)

    来自:http://blog.csdn.net/gongzhe2011/article/details/27351853 using System.Windows.Forms; using Syste ...