quailty and ccpc

hdoj-6666

题目很简单,按照题目的意思模拟就行了,排序。

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<string>
using namespace std;
struct node{
string name;
int num;
int time;
node(){}
node(string s,int a,int b):name(s),num(a),time(b){}
bool operator<(const node& t)const{
if(num==t.num){
return time<t.time;
}
return num>t.num;
}
};
node team[100005];
int n,d;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int t;
cin>>t;
while(t--){
cin>>n>>d;
string s;
int num,time;
for(int i=0;i<n;i++){
cin>>s>>num>>time;
team[i]=node(s,num,time);
}
sort(team,team+n);
int total=n*d;
if(total%10!=5){
cout<<"Quailty is very great"<<endl;
}else{
total/=10;
cout<<team[total].name<<endl;
}
}
return 0;
}

HDOJ-6666(简单题+模拟题)的更多相关文章

  1. NEFU 2016省赛演练一 I题 (模拟题)

    这题没名字 Problem:I Time Limit:2000ms Memory Limit:65535K Description Now give you an interger m and a s ...

  2. Codeforces Round #237 (Div. 2) B题模拟题

    链接:http://codeforces.com/contest/404/problem/B B. Marathon time limit per test 1 second memory limit ...

  3. UVa 679 小球下落 简单模拟题,树

    题目大意:给你一个完全二叉树,并且给他们编号,编号规则为左子树为2*k,右子树为2*k+1,每一个节点 上都有一个开关,初始时开关都处于关闭状态,小球碰到节点就会改变该点的开关的状态.然后给你I个小球 ...

  4. POJ 1008 简单模拟题

    e.... 虽然这是一道灰常简单的模拟题.但是米做的时候没有读懂第二个日历的计时方法.然后捏.敲完之后华丽的WA了进一个点.坑点就在一年的最后一天你是该输出本年的.e ...但是我好想并没有..看di ...

  5. Sdut 2409 The Best Seat in ACM Contest(山东省第三届ACM省赛 H 题)(模拟)

    题目描述 Cainiao is a university student who loves ACM contest very much. It is a festival for him once ...

  6. hdu 5641 King's Phone(暴力模拟题)

    Problem Description In a military parade, the King sees lots of new things, including an Andriod Pho ...

  7. hdu 4706 Children's Day 2013年ICPC热身赛A题 模拟

    题意:按字母顺序排列成n型,简单的模拟题. 当字母排到z时从a开始重新排起. 代码: /* * Author: illuz <iilluzen[at]gmail.com> * Blog: ...

  8. 2019浙大校赛--A--Thanks, TuSimple!(简单模拟题)

    这题前三段都是一堆吹爆赞助商的屁话,正式题目在图片下边,一个简单模拟题. 题目大意: 有n个男生,m个女生在进行舞会,其中一部分男生祥和比自己矮的女生跳舞,一部分男生想和比自己高的女生跳舞,一部分女生 ...

  9. ACM: NBUT 1105 多连块拼图 - 水题 - 模拟

    NBUT 1105  多连块拼图 Time Limit:1000MS     Memory Limit:65535KB     64bit IO Format:  Practice  Appoint ...

随机推荐

  1. 在kubernetes集群里集成Apollo配置中心(3)之交付Apollo-portal至Kubernetes集群

    1.执行apollo-portal数据库脚本 apollo-portal数据库脚本链接:https://raw.githubusercontent.com/ctripcorp/apollo/1.5.1 ...

  2. 【原创】k8s之job和Cronjob

    1.失败任务 apiVersion: batch/v1 kind: Job metadata: name: bad spec: template: metadata: name: bad spec: ...

  3. Kubernets二进制安装(5)之私有仓库harbor搭建

    在IP地址为192.168.80.50,机器名为mfyxw50上搭建私有仓库harbor harbor下载地址: harbor下载连接地址:https://github.com/goharbor/ha ...

  4. leetcode16 最接近的三数之和 双指针

    三个数循环太复杂 确定一个数,搜索另两个 先排序,之后就确定了搜索的策略 if(tp>target) while (l < r && nums[r] == nums[--r ...

  5. 【GitChat首秀:限时免费】互联网测试岗校招的那些事儿

    2020 校园秋招即将结束,2021 校招春招即将开始. 作为一名扎根互联网近十年的资深测试开发,我刚经历过数十个测试岗位的校招笔试和面试选拔.在 2020 年秋招面试过程中,我深深地感受到" ...

  6. Sentry 高级使用教程

    Sentry 高级使用教程 Sentry versions https://github.com/getsentry/sentry-docs https://github.com/getsentry/ ...

  7. Windows 常用键盘快捷键:

    键盘快捷键 通过使用键盘快捷键可以节省时间. Windows 和 Mac 的键盘快捷键 在现代操作系统中和计算机软件程序中,键盘快捷键经常被使用. 使用键盘快捷键能帮您节省很多时间. 基本的快捷键 描 ...

  8. JavaScript code 性能优化

    1 1 1 JavaScript 性能优化 prototype 闭包 Closure 内存泄漏 event system 1 定义类方法以下是低效的,因为每次构建baz.Bar的实例时,都会为foo创 ...

  9. algorithm & bitwise operation & the best leetcode solutions

    algorithm & bitwise operation & the best leetcode solutions leetcode 136 single-number the b ...

  10. Azure 信用卡扣款 1 美元 & Azure 中国客服

    Azure 信用卡扣款 1 美元 & azure 中国客服 Azure 免费帐户常见问题 https://azure.microsoft.com/zh-cn/free/free-account ...