334 (Div. 2) A(模拟)
来源:互联网 发布:ntp网络时间服务器 编辑:程序博客网 时间:2024/06/18 08:08
题解:注意不要挂精度,先用double求和,再取整。
#include<iostream>#include<string>#include<cstdio>#include<algorithm>#include<cstring>using namespace std;int main(){#ifdef CDZSCfreopen("i.txt","r",stdin);#endifint a[]={500,1000,1500,2000,2500};double sum=0;int m[10],w[10],ha,uha;for(int i=0;i<5;i++)scanf("%d",m+i);for(int i=0;i<5;i++)scanf("%d",w+i);scanf("%d%d",&ha,&uha);for(int i=0;i<5;i++){sum+=max(0.3*a[i],((1-m[i]*1.0/250.0)*1.0*a[i]-50*1.0*w[i]));}sum+=ha*100-uha*50;printf("%d\n",int(sum));return 0;}
0 0
- 334 (Div. 2) A(模拟)
- Codeforces Round #194 (Div. 2) / 334A Candy Bags(模拟)
- CF #284 (Div. 2) A.(模拟)
- Codeforces Round #297 (Div. 2) A(模拟)
- Codeforces Round #340 (Div. 2)(A) 模拟
- 【Codeforces Round 334 (Div 2)A】【模拟 水题】Uncowed Forces CF算分模拟
- Codeforces Round #400 (Div. 1 + Div. 2, combined)A. A Serial Killer【模拟】
- Codeforces Round #173 (Div. 2) / 282A Bit++(模拟)
- Codeforces Round #143 (Div. 2) / 231A Team (模拟)
- Codeforces Round #147 (Div. 2) / 237A Free Cash (模拟)
- Codeforces Round #107 (Div. 2) A(简单模拟)
- Codeforces Round #109 (Div. 2) A (简单模拟)
- Codeforces Round #281 (Div. 2)A(构造+暴力模拟)
- Codeforces#295(Div.2)A、B(模拟+BFS)
- Codeforces Round #Pi (Div. 2)567A Lineland Mail(模拟)
- Codeforces Round #315 (Div. 2)569A Music(模拟)
- Codeforces Round #315 (Div. 2) A. Music (模拟)
- Codeforces Round #316 (Div. 2)570A Elections(模拟)
- 黑马程序员--java基础流程控制与方法(下)
- 5大布局方式详解
- 01.Django学习之安装,建立项目,传参,MySQL数据库,静态文件配置和模板的使用
- codeforces #334 div1 603C Lieges of Legendre(博弈)
- 02.Django后台和数据库的设计
- 334 (Div. 2) A(模拟)
- HDU 3336 Count the string
- c#编辑记事本
- Activty与Fragment交互通信
- CSS水平居中/垂直居中的N个方法 前端开发必收藏
- 334 (Div. 2) B(贪心)
- XAMPP安装(Apache+MySQL+PHP+PERL)
- android的APP签名打包 和APP 宣传图片和中文名字 的一些介绍 适合(初学者)
- linux