Quality and CCPC
2024-08-30 08:18:45
English foundation:
the fractional part 小数部分
disclaimer 免责声明
fictitious 虚构的,编造的;假定的,虚设的;小说式的;假装的
No two teams have the same name.
round down the number 下取整
proportion 比例,占比;部分;面积;均衡
rounded to the nearest integer 四舍五入到最近的整数
Rounding means to make a number shorter or simpler, but keeping it as close in value as possible to the original number.
A team ranks before another if they solved more problems or both teams solved an equal number of problems but they had less penalty time.
题目:http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1010&cid=855
分析:
代码:
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std; struct team
{
char s[15];
int p,t;
}te[100005]; bool cmp(team x,team y)
{
if(x.p==y.p) return x.t<y.t;
else return x.p>y.p;
} int main()
{
int T;
scanf("%d",&T);
while(T--)
{
int num,d;
scanf("%d%d",&num,&d);
for(int i=0;i<num;i++)
{
scanf("%s",te[i].s);
scanf("%d%d",&te[i].p,&te[i].t);
}
if(num*d%10!=5)
{
puts("Quailty is very great");
continue;
}
else
{
sort(te,te+num,cmp);
int x=ceil(num*0.1*d)-1;
printf("%s\n",te[x].s);
}
}
}
最新文章
- LVS集群之DR模式 实现
- angular $http配置属性
- 12 哈希表相关类——Live555源码阅读(一)基本组件类
- HS光流算法详解<;转载>;
- linux包之e2fsprogs之chattr命令
- easyui 多行文本框 Multiline TextBox
- 移动开发(webapp)过程中的小细节总结
- HDU 4082 Hou Yi&#39;s secret(暴力)
- word插入图片显示不完整的解决的方法
- 2964:日历问题-poj
- kali linux 2.0 web 渗透测试 电子书
- 4.alembic数据迁移工具
- linux systemd详解
- Django-rest-framework 接口实现 权限:(Permission)
- 【多媒体封装格式详解】--- AAC ADTS格式分析
- 一道生成不重复随机数字的C#笔试编程题
- opencv中imread第二个参数的意义
- 泊松分布E(X^2)
- html css 伪样式
- 【JavaScript】JavaScript(V8)实现输入输出