Hdu 5268 (BestCoder Round #44 A)

简介:

http://acm.hdu.edu.cn/showproblem.php?pid=5268
简单水题:
只给出代码:

#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int T,a,b;
    cin>>T;
    for(int k=1; k<=T; k++)
    {
        int sum,ans=0;
        for(int i=2; i<=5; i++)
        {
            cin>>a>>b;
            sum=2*i*(250-a)-50*b;
            ans+=max(sum,(int)(0.4*i*500));
        }
        cout<<"Case #"<<k<<": "<<ans<<endl;
    }
    return 0;
}
目录
相关文章
|
6月前
|
人工智能 Java
HDU-1003- Max Sum (动态规划)
HDU-1003- Max Sum (动态规划)
37 0
|
人工智能
HDOJ/HDU 2710 Max Factor(素数快速筛选~)
HDOJ/HDU 2710 Max Factor(素数快速筛选~)
105 0
|
人工智能 算法 搜索推荐
ZOJ 3499. Median
    地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4322     题意:寻找中位数。对于一个(浮点数)数组,如果含有奇数个元素,“中位数”就是排序后位于数组中间那个。
1293 1
Codeforces Round #434 (Div. 2, based on Technocup 2018 Elimination Round 1)&&Codeforces 861A k-rounding【暴力】
A. k-rounding time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output ...
1247 0
Codeforces Round #434 (Div. 2, based on Technocup 2018 Elimination Round 1)&&Codeforces 861B Which floor?【枚举,暴力】
B. Which floor? time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output...
1318 0
|
存储 人工智能 算法
HDU 1024 Max Sum Plus Plus【动态规划求最大M子段和详解 】
Max Sum Plus Plus Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 29942    Accepted Submissio...
2398 0