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 ...
随机推荐
- Android中实现app版本更新
1,获取本地程序apk版本,并开启服务(下面这段代码一般在主Activity中的onCreate()方法中执行的,并开启后台服务下载新版本的apk) //获取apk包文件的管理者对象 PackageM ...
- 手动写的第一个eChart代码
手动写的第一个eChart代码 ,第一感觉,杂乱无章 <!doctype html> <html> <head> <meta charset="UT ...
- 基于fullpage的幻灯片播放
<!DOCTYPE html> <html> <head lang="en"> <meta charset="utf-8&quo ...
- requireJs和r.js压缩工具
上面release是执行命令 node r.js -o build.js 生成的,需要切换到目录require/tools下面,也就是 有r.js和build.js的目录,才能执行命令 代码目录如上: ...
- Android应用开发中的风格和主题(style,themes)
http://www.cnblogs.com/playing/archive/2011/04/01/2002469.html 越来越多互联网企业都在Android平台上部署其客户端,为了提升用户体验, ...
- ThinkPHP讲解(五)——数据库配置及Model数据模型层、查询
数据库配置 在TP框架中要进行连接数据库操作,要进行配置 要在convertion.php中找到“数据库配置”,并复制到项目配置文件config.php中 Model模型层制作 model:数据库中每 ...
- JSP-01-搭建Web应用环境
一.搭建Web应用环境 Tomcat 下载会有两种版本,安装版和解压版,这里以解压版为例 Web服务: 是实现“基于Web无缝集成”的目标而提出的全新概念,希望通过Web服务能够实现不同的系统之间的相 ...
- url传参
1.两种url形式传参index.php/action/function/id/2 这种模式下:$_GET[action]就是function,$_GET[id]就是2
- Vmware 10安装MAC OS X 10.9备忘
下载准备 Vmware 10 unlock-all-v120.zip (用以支持新建MAC) MAC OS X 10.9 VMWARE.rar 已经安装完成的MAC系统虚拟机镜 ...
- asp.net项目发布网上-当前自定义错误设置禁止远程查看应用程序
早上服务器的系统突然出错了,悲剧~ ==============异常信息:============================== 服务器上出现应用程序错误.此应用程序的当前自定义错误设置禁止远程 ...