codeforces #334 div2 A. Uncowed Forces
题意是说,给定一个计算规则,求最终分数。
又傻逼了QAQ
遇到double类型一定要小心小心小心!
虽然我觉得0.3*x一定是整数..这样子应该没问题的吧。。但还是跪了。下次有double型的数据即使是整数,可以这样写 int(x+0.5)
1/* ***********************************************
2Author :111qqz
3Created Time :2015年12月01日 星期二 23时20分45秒
4File Name :code/cf/#334/A.cpp
5************************************************ */
6
7#include <cstdio>
8#include <cstring>
9#include <iostream>
10#include <algorithm>
11#include <vector>
12#include <queue>
13#include <set>
14#include <map>
15#include <string>
16#include <cmath>
17#include <cstdlib>
18#include <ctime>
19#define fst first
20#define sec second
21#define lson l,m,rt<<1
22#define rson m+1,r,rt<<1|1
23#define ms(a,x) memset(a,x,sizeof(a))
24typedef long long LL;
25
26
27
28using namespace std;
29const double eps = 1E-8;
30const int dx4[4]={1,0,0,-1};
31const int dy4[4]={0,-1,1,0};
32const int inf = 0x3f3f3f3f;
33const int N=10;
34int m[N];
35int w[10];
36int hs,hu;
37int s[10]={500,1000,1500,2000,2500};
38int main()
39{
40 #ifndef ONLINE_JUDGE
41 freopen("code/in.txt","r",stdin);
42 #endif
43
44 for ( int i = 0 ; i < 5 ; i++) scanf("%d",&m[i]);
45 for ( int i = 0 ; i < 5 ; i++) scanf("%d",&w[i]);
46 scanf("%d %d",&hs,&hu);
47 int ans = 0 ;
48 for ( int i = 0 ; i < 5 ; i++)
49 {
50 ans = ans +max(s[i]*3/10,s[i]-m[i]*s[i]/250-50*w[i]);
51 // ans = ans+ max(int(0.3*s[i]),s[i]-m[i]*s[i]/250-50*w[i]); 会WA test6
52 }
53 ans = ans + hs*100;
54 ans = ans - hu*50;
55
56 cout<<ans<<endl;
57
58
59
60
61 #ifndef ONLINE_JUDGE
62 fclose(stdin);
63 #endif
64 return 0;
65}