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. java随机数的产生

    两种产生随机数的方法: 1.通过import java.util.Random来实现 2.Math.random() 一.第一种的话就是导入Random之后,先生成一个Random对象r,之后再利用r ...

  2. 牛客小白月赛30 B.最好的宝石 (线段树)

    题意:RT. 题解:很明显的线段树维护区间最大值操作,但是我们同时还要维护最大值的个数,我们在build或者modify操作完子树然后push_up的时候,我们先从两个儿子取max更新父节点的最大值, ...

  3. WPF 无法对元素“TextBox”设置 Name 特性值“TB2”

    错误信息 无法对元素"TextBox"设置 Name 特性值"TB2"."TextBox"在元素"UserControl1&quo ...

  4. WPF 主动触发依赖属性的 PropertyChanged

    需求背景 需要显示 ViewModel 中的 Message/DpMessage,显示内容根据其某些属性来确定.代码结构抽象如下: // Model public class Message : IN ...

  5. Jmeter入门使用

    1. 什么是Jmeter 转自:https://www.cnblogs.com/lijuanhu321/p/9537185.html#testComponent https://www.cnblogs ...

  6. 梨子带你刷burp练兵场(burp Academy) - 服务端篇 - Sql注入配套漏洞讲解笔记

    目录 Sql注入 什么是Sql注入呢? Sql注入有哪些例子? 检索隐藏数据 打破应用逻辑 利用Union进行跨库查询 如何确定利用Union的注入攻击所需的列数呢? 如何确定Union的查询结果中哪 ...

  7. windows安装

    1.windows系统版本分类a. 个人版windows98.XP.win7,win8,win10b. 企业版/服务器版windows server NT/2000/2003/2008/2012[广泛 ...

  8. Java之浅拷贝和深拷贝

    [概述] Java中的对象拷贝 ( Object Copy ) 是指将一个对象的所有属性(成员变量)拷贝到另一个有着相同类类型的对象中去.例如,对象 A 和对象 B 都属于类 S,具有属性 a 和 b ...

  9. spring-cloud-netflix-config

    Spring Cloud Config 在我们了解spring cloud config之前,我可以想想一个配置中心提供的核心功能应该有什么 提供服务端和客户端支持 集中管理各环境的配置文件 配置文件 ...

  10. redis运维与开发笔记