HDU 1004 Let the Balloon Rise map
Let the Balloon Rise
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 104108 Accepted Submission(s): 40046
This year, they decide to leave this lovely job to you.
A test case with N = 0 terminates the input and this test case is not to be processed.
思路:简单map
#include <iostream>
#include <string>
#include <map>
using namespace std;
int main()
{
int n, max;
];
map<string,int> one;
map<string, int>::iterator itea;
string str;
while(cin>>n&&n)
{
while(n--)
{
cin>>str;
one[str]++;
}
,itea=one.begin();itea!=one.end();++itea)
{
if(itea->second>max)
{
max=itea->second;
str=itea->first;
}
}
cout<<str<<endl;
one.clear();
}
}
HDU 1004 Let the Balloon Rise map的更多相关文章
- HDU 1004 Let the Balloon Rise(map应用)
Problem Description Contest time again! How excited it is to see balloons floating around. But to te ...
- HDU 1004 Let the Balloon Rise(map的使用)
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1004 Let the Balloon Rise Time Limit: 2000/1000 MS (J ...
- hdu 1004 Let the Balloon Rise(字典树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1004 Let the Balloon Rise Time Limit: 2000/1000 MS (J ...
- HDU 1004 Let the Balloon Rise【STL<map>】
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Oth ...
- hdu 1004 Let the Balloon Rise strcmp、map、trie树
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Oth ...
- hdu 1004 Let the Balloon Rise 解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1004 用STL 中的 Map 写的 #include <iostream> #includ ...
- hdu 1004 Let the Balloon Rise
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Oth ...
- HDU 1004 - Let the Balloon Rise(map 用法样例)
Problem Description Contest time again! How excited it is to see balloons floating around. But to te ...
- HDU 1004 Let the Balloon Rise(STL初体验之map)
Problem Description Contest time again! How excited it is to see balloons floating around. But to te ...
随机推荐
- paper 27 :图像/视觉显著性检测技术发展情况梳理(Saliency Detection、Visual Attention)
1. 早期C. Koch与S. Ullman的研究工作. 他们提出了非常有影响力的生物启发模型. C. Koch and S. Ullman . Shifts in selective visual ...
- Bootstrap布局设计
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...
- oracle索引使用时注意
1.使用不等于操作符(<>, !=)下面这种情况,即使在列dept_id有一个索引,查询语句仍然执行一次全表扫描 select * from dept where staff_num &l ...
- Oracle的分页查询
--1:无ORDER BY排序的写法.(效率最高)--(经过测试,此方法成本最低,只嵌套一层,速度最快!即使查询的数据量再大,也几乎不受影响,速度依然!) SELECT * FROM (SELECT ...
- zw版【转发·台湾nvp系列例程】HALCON MirrorRegion (Delphi)
zw版[转发·台湾nvp系列例程]HALCON MirrorRegion (Delphi) procedure TForm1.Button1Click(Sender: TObject);var img ...
- keep your work after network broken
如下设置可以保证在网络中断后tso仍然可以继续active,并等到下一次reconnect sys1.tcpparms(tnprof7d) -- Dataset name and PDS name b ...
- STM32的PWM输出极性的问题
又开始玩PWM, 先试了一下PWM的两个引脚输出相反极性, 但是分析仪上看到, 两个脚是一样一样的. 写是这么写的: ... TIM_OCInitStructure.TIM_OCMode=TIM_OC ...
- 内存泄露:*.hprof
使用Memory Analyzer tool(MAT)分析内存泄漏 转账地址:http://www.blogjava.net/rosen/archive/2010/06/13/323522.html ...
- function adapter(函数适配器)和迭代器适配器
所谓function adapter(函数适配器)是指能够将不同的函数对象(或是和某值或某寻常函数)结合起来的东西,它自身也是个函数对象. 迭代器适配器 运用STL中的迭代器适配器,可以使得算法能够 ...
- js闭包的产生
当函数可以记住并访问所在的词法作用域, 即函数是在当前词法作用域之外执行, 这时就产生了闭包. function a () { function b () { //函数b的词法作用域是在函数a内 ...