Gym-100712A-Who Is The Winner
来源:互联网 发布:mac面对面快传 编辑:程序博客网 时间:2024/06/05 10:53
排序一下就好了
#include<cstdio>#include<cstring>#include<iostream>#include<algorithm>#include<cmath>using namespace std;struct point{ char str[25]; int s,p;};int cmp(point a, point b){ return a.s>b.s||a.s==b.s&&a.p<b.p;}point a[105];int main(){ int t; scanf("%d",&t); while(t--) { int n; scanf("%d",&n); for(int i=0;i<n;i++) { getchar(); scanf("%s",a[i].str); scanf("%d%d",&a[i].s,&a[i].p); } sort(a,a+n,cmp); printf("%s\n",a[0].str); } return 0;}
0 0
- Gym-100712A-Who Is The Winner
- Gym 100712A Who Is The Winner
- GYM 100712 A.Who Is The Winner?(水~)
- 判断游戏胜者-Who Is the Winner
- A. Who is Older?
- who is the real hero!
- Who is the Smartest Man
- HDU5123 who is the best?
- Here is the Book List of a programmer who want to upgrade his/her skill (zz)
- The girl is hot who works in a Factory (Rails 中代替fixture的factory_girl)
- 【CUGBACM15级BC第20场 A】hdu 5123 who is the best?
- Who is the lion(谁是狮子)!
- zoj3519 Who is the Smartest Man//贪心
- zoj 3519 Who is the Smartest Man
- zoj 3519 Who is the Smartest Man
- Determine who is monopolizing the CPU
- ZOJ3519 BIT1004 Who is the Smartest Man
- bit Who is the Smartest Man
- 事件分发
- bestcoder 百度之星 1002 列变位法解密
- MYSQL的常用SQL的优化
- 《安卓Webview漏洞的检测与利用》
- 【bzoj3282】Tree
- Gym-100712A-Who Is The Winner
- 让cmd或bat文件运行完后停在运行界面
- Python 3.X 与 2.X 的恩怨情仇 (一)
- vim的基本用法
- C#访问postgresql数据库类MyPostDB的实现
- centos6.7、centos6.5下yum方式搭建lnmp环境,php5.4/mysql5.5
- 搭建Struts2+Spring+Hibernate三大框架的步骤
- Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback之间的关系
- nodejs https request CERT_UNTRUSTED