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);
}
}
}

  

 
 

最新文章

  1. LVS集群之DR模式 实现
  2. angular $http配置属性
  3. 12 哈希表相关类——Live555源码阅读(一)基本组件类
  4. HS光流算法详解&lt;转载&gt;
  5. linux包之e2fsprogs之chattr命令
  6. easyui 多行文本框 Multiline TextBox
  7. 移动开发(webapp)过程中的小细节总结
  8. HDU 4082 Hou Yi&#39;s secret(暴力)
  9. word插入图片显示不完整的解决的方法
  10. 2964:日历问题-poj
  11. kali linux 2.0 web 渗透测试 电子书
  12. 4.alembic数据迁移工具
  13. linux systemd详解
  14. Django-rest-framework 接口实现 权限:(Permission)
  15. 【多媒体封装格式详解】--- AAC ADTS格式分析
  16. 一道生成不重复随机数字的C#笔试编程题
  17. opencv中imread第二个参数的意义
  18. 泊松分布E(X^2)
  19. html css 伪样式
  20. 【JavaScript】JavaScript(V8)实现输入输出

热门文章

  1. 灵活运用SQL Server2008 SSIS变量
  2. 13 年的 Bug 调试经验总结 【转载】
  3. 09、const与extern在一起跨文件引用
  4. phpcmsv9 后台统计编辑发稿数量
  5. Flex布局如何实现最后一个元素右对齐,或者第一个元素左对齐
  6. PHP0006:PHP基础--函数2
  7. 与soul上的一个妹子聊天有感
  8. Luogu2577 | [ZJOI2005]午餐 (贪心+DP)
  9. 关于学习java虚拟机的知识整理一:jvm内存区域
  10. tcp_demo