UVa 12015 - Google is Feeling Lucky
来源:互联网 发布:apache有什么作用 编辑:程序博客网 时间:2024/06/04 18:44
题目:给你机组数据,每组10个网址和检索能力,输出检索能力最高的网址。
分析:简单题。直接按能力值排序即可,输出多有最大的即可。
说明:这么多水题,一刷一上午╮(╯▽╰)╭。
#include <algorithm>#include <iostream>#include <cstdlib>#include <cstdio>using namespace std;struct web{string name;int time;}W[11];bool cmp( web a, web b ){return a.time > b.time;}int main(){int T;while ( cin >> T )for ( int t = 1 ; t <= T ; ++ t ) {cout << "Case #" << t <<":" << endl;for ( int i = 0 ; i < 10 ; ++ i )cin >> W[i].name >> W[i].time; sort( W, W+10, cmp );for ( int i = 0 ; W[i].time == W[0].time ; ++ i )cout << W[i].name << endl;}return 0;}
0 0
- UVa 12015 - Google is Feeling Lucky
- 12015 - Google is Feeling Lucky
- uva 12015 Google is Feeling Lucky 谷歌杯程序设计大赛
- UVa 12015 - Google is Feeling Lucky 解题报告
- nefu 648 Google is Feeling Lucky
- QUST程序设计赛A题:Google is Feeling Lucky
- Google is Feeling Lucky(2011上海谷歌杯ACM-ICPC程序大赛G题)
- 善用 Google 的 "手气不错" "I'm feeling lucky" 搜索
- The feeling is good
- feeling
- Feeling
- feeling
- feeling
- feeling
- feeling
- Every Day is a Lucky
- UVA 10909 - Lucky Number(树状数组)
- uva 10909 - Lucky Number(树状数组)
- Android中的基本控件(下,章节摘要)
- 第一章 程序设计入门习题
- Naxx
- Ubuntu12.04解决无线网卡驱动问题
- 拍拍网
- UVa 12015 - Google is Feeling Lucky
- 细谈单片机寄存器
- hdu2819Swap (行列匹配,输出交换路径)
- Android开发之WebView详解
- hdu 1021 Fibonacci Again(找规律)
- 实现Vmware10中的Mac OS X10.9与主机Windows8.1的硬盘文件共享
- 黑马程序员之java学习笔记11
- 51单片机中断
- [水]ZOJ1089