HDU 5268 ZYB loves Score (简单模拟,水)
题意:计算Bestcoder四题的得分。
思路:直接模拟,4项分数直接计算后输出。注意不要低于百分之40的分。
//#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#define LL long long
using namespace std;
const int N=;
int a[N];
int b[N]; int cal()
{
int ans=;
ans=(/*(-a[])-b[]* >*0.4? /*(-a[])-b[]*: *0.4 );
ans+=(/*(-a[])-b[]*>*0.4? /*(-a[])-b[]*: *0.4);
ans+=(/*(-a[])-b[]*>*0.4? /*(-a[])-b[]*: *0.4);
ans+=(/*(-a[])-b[]*>*0.4? /*(-a[])-b[]*: *0.4);
return ans;
}
int main()
{
// freopen("input.txt", "r", stdin);
int t, j=;
cin>>t;
while(t--)
{
scanf("%d%d",&a[],&b[]);
scanf("%d%d",&a[],&b[]);
scanf("%d%d",&a[],&b[]);
scanf("%d%d",&a[],&b[]);
printf("Case #%d: %d\n",++j,cal());
}
return ;
}
AC代码
HDU 5268 ZYB loves Score (简单模拟,水)的更多相关文章
- hdu 5268 ZYB loves Score 水题
ZYB loves Score Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?p ...
- 【HDU 4452 Running Rabbits】简单模拟
两只兔子Tom和Jerry在一个n*n的格子区域跑,分别起始于(1,1)和(n,n),有各自的速度speed(格/小时).初始方向dir(E.N.W.S)和左转周期turn(小时/次). 各自每小时往 ...
- HDU 5805 NanoApe Loves Sequence (模拟)
NanoApe Loves Sequence 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5805 Description NanoApe, the ...
- hdu 4414 Finding crosses【简单模拟】
题目:http://acm.hdu.edu.cn/showproblem.php?pid=4414 CSUST:点击打开链接 Finding crosses Time Limit: 2000/1000 ...
- HDOJ 1008. Elevator 简单模拟水题
Elevator Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Su ...
- HDU 5806 NanoApe Loves Sequence Ⅱ (模拟)
NanoApe Loves Sequence Ⅱ 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5806 Description NanoApe, t ...
- HDU 5995 Kblack loves flag (模拟)
题目链接 Problem Description Kblack loves flags, so he has infinite flags in his pocket. One day, Kblack ...
- hdu 1200 To and Fro(简单模拟或DP)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1200 To and Fro Time Limit: 2000/1000 MS (Java/Others ...
- hdu 5269 ZYB loves Xor I
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission( ...
随机推荐
- POJ 2010
Moo University - Financial Aid Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 4235 A ...
- Codeforces Round #258 (Div. 2)(A,B,C,D)
题目链接 A. Game With Sticks time limit per test:1 secondmemory limit per test:256 megabytesinput:standa ...
- Java Applet与Java Application的特点
java application是应用程序,用于桌面开发,java applet是小应用程序,一般嵌入到网页里运行.applet一般用于B/S页面上作为插件式的开发,而application主要是桌面 ...
- java多线程知识点总结
1.线程调度知识:线程类Thread的了解,几个thread的方法.thread.sleep(),thread.join().(调用join方法的那个线程会立刻执行). object.wait()方法 ...
- android-exploitme(一):生成apk
exploitme是一个国外的android安全测试环境,http://securitycompass.github.io/AndroidLabs/index.html,通过它可以学习一些基本的测试方 ...
- Hibernate笔记——hql总结
原文:http://www.cnblogs.com/xiaoluo501395377/p/3376256.html ------------------------------------------ ...
- ThinkPHP:读取数据库数据 (2)
项目配置文件Conf/config.php中添加数据库连接信息: // 添加数据库配置信息 'DB_TYPE' => 'mysql', // 数据库类型 'DB_HOST' => 'loc ...
- HTML5之拖拽(兼容IE和非IE)
前世:项目中需要拖动div,然后和某个div进行位置交换,这不是关键,关键是还要保存位置,然后在下次打开的时候按照保存的位置显示.还好本人功力深厚,一下子就想到了用localStorage来保存,事实 ...
- Android应用截图和SurfaceView截图问题总结
最近在做android截图应用的过程遇到很多问题,接触了好些截图方法,但是还是不能实现SufaceView截图功能.今天就把我尝试过的方法总结下,希望把我惨痛的经历写出来后能够帮助到要做此 ...
- spring路径通配符
在应用Spring的工程中,使用class path的方式加载配置文件应该是最常用的做法,然而对大部分人来说,刚开始使用Spring时,几乎都碰到过加载配置文件失败的情况,除了配置上的错误外,很多时候 ...