HDOJ-6666(简单题+模拟题)
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(简单题+模拟题)的更多相关文章
- NEFU 2016省赛演练一 I题 (模拟题)
这题没名字 Problem:I Time Limit:2000ms Memory Limit:65535K Description Now give you an interger m and a s ...
- Codeforces Round #237 (Div. 2) B题模拟题
链接:http://codeforces.com/contest/404/problem/B B. Marathon time limit per test 1 second memory limit ...
- UVa 679 小球下落 简单模拟题,树
题目大意:给你一个完全二叉树,并且给他们编号,编号规则为左子树为2*k,右子树为2*k+1,每一个节点 上都有一个开关,初始时开关都处于关闭状态,小球碰到节点就会改变该点的开关的状态.然后给你I个小球 ...
- POJ 1008 简单模拟题
e.... 虽然这是一道灰常简单的模拟题.但是米做的时候没有读懂第二个日历的计时方法.然后捏.敲完之后华丽的WA了进一个点.坑点就在一年的最后一天你是该输出本年的.e ...但是我好想并没有..看di ...
- 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 ...
- hdu 5641 King's Phone(暴力模拟题)
Problem Description In a military parade, the King sees lots of new things, including an Andriod Pho ...
- hdu 4706 Children's Day 2013年ICPC热身赛A题 模拟
题意:按字母顺序排列成n型,简单的模拟题. 当字母排到z时从a开始重新排起. 代码: /* * Author: illuz <iilluzen[at]gmail.com> * Blog: ...
- 2019浙大校赛--A--Thanks, TuSimple!(简单模拟题)
这题前三段都是一堆吹爆赞助商的屁话,正式题目在图片下边,一个简单模拟题. 题目大意: 有n个男生,m个女生在进行舞会,其中一部分男生祥和比自己矮的女生跳舞,一部分男生想和比自己高的女生跳舞,一部分女生 ...
- ACM: NBUT 1105 多连块拼图 - 水题 - 模拟
NBUT 1105 多连块拼图 Time Limit:1000MS Memory Limit:65535KB 64bit IO Format: Practice Appoint ...
随机推荐
- Consonant Fencity Gym - 101612C 暴力二进制枚举 Intelligence in Perpendicularia Gym - 101612I 思维
题意1: 给你一个由小写字母构成的字符串s,你可以其中某些字符变成大写字母.如果s中有字母a,你如果想把a变成大写,那s字符串中的每一个a都要变成A 最后你需要要出来所有的字符对,s[i]和s[i-1 ...
- hdu4533 威威猫系列故事——晒被子
Problem Description 因为马拉松初赛中吃鸡腿的题目让不少人抱憾而归,威威猫一直觉得愧对大家,这几天他悄悄搬到直角坐标系里去住了. 生活还要继续,太阳也照常升起,今天,威威猫在第一象限 ...
- httprunner(9)运行测试用例的方式总结
前言 用过pytest的小伙伴都知道,pytest的运行方式是非常丰富的,可以说是你想怎么运行怎么运行,想运行哪些运行哪些,那httprunner是否同样可以呢? 运行用例的各种方式 运行指定路径的用 ...
- 国产smartbits版本-minismb如何测试路由器III
Minismb测试仪表是复刻smartbits的国产版本,是一款专门用于测试智能路由器,网络交换机的性能和稳定性的软硬件相结合的工具.可以通过此工具测试任何ip网络设备的端口吞吐率,带宽,并发连接数和 ...
- LEETCODE - 1228【等差数列中缺失的数字】
C++: class Solution { public: int missingNumber(vector<int>& arr) { int subnum ...
- JSON简单理解
JSON 与 JS 对象的关系 很多人搞不清楚 JSON 和 Js 对象的关系,甚至连谁是谁都不清楚.其实,可以这么理解: JSON 是 JS 对象的字符串表示法,它使用文本表示一个 JS 对象的信息 ...
- bash variables plus operator All In One
bash variables plus operator All In One Errors missing pass params #!/usr/bin/env bash # echo emoji ...
- awesome youtube programming video tutorials
awesome youtube programming video tutorials youtube programming tutorials https://www.youtube.com/fe ...
- js & array & shuffle
js & array & shuffle const list = [1, 2, 3, 4, 5, 6, 7, 8, 9]; list.sort(() => Math.rando ...
- how to export svg form web page in js
how to export svg form web page in js https://stackoverflow.com/questions/2483919/how-to-save-svg-ca ...