CodeForces 604 A.Uncowed Forces(水~)

本文介绍了一种竞赛编程中的计分系统实现方法,通过具体的示例解释了如何根据题目难度、解答时间和错误次数来计算选手的总得分,并提供了一个简单的C++程序代码示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Description
五道题,得分分别是500,1000,1500,2000,2500,第i道题用时mi,WA了wi发,一道分数x,用时m,WA了w发的题得分max(0.3x,(1-m/250)x-50w,hack成功得100分,失败扣50分,问总得分
Input
首先五个整数mi表示五道题的罚时,然后输入五个整数wi表示每道题WA的次数,然后两个整数hs和hu表示hack成功和失败的次数(0<=mi<=119,0<=wi<=10,0<=hs,hu<=20)
Output
输出总得分
Sample Input
20 40 60 80 100
0 1 2 3 4
1 0
Sample Output
4900
Solution
水题,按规则统计分数即可
Code

#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<ctime>
using namespace std;
typedef long long ll;
#define INF 0x3f3f3f3f
#define maxn 1111
int x[]={500,1000,1500,2000,2500};
int m[5],w[5],hs,hu;
int main()
{
    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",&hs,&hu);
    int ans=100*hs-50*hu;
    for(int i=0;i<5;i++)
        ans+=max(x[i]/10*3,x[i]-x[i]/250*m[i]-50*w[i]);
    printf("%d\n",ans);
    return 0;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值