HDU-1004 Let the Balloon Rise(STL: map)
来源:互联网 发布:java和android的前景 编辑:程序博客网 时间:2024/06/10 21:21
题目链接: Let the Balloon Rise
思路: map 的使用
CODE:
#include <iostream>#include<stdio.h>#include<map>using namespace std;map<string,int> ma;int main(){ //freopen("in.in","r",stdin); int n; while(~scanf("%d",&n),n) { ma.clear(); string ball; while(n--) { cin>>ball; ma[ball]++; } int maxn=0; map<string,int>::iterator it; map<string,int>::iterator maxx; for(it=ma.begin();it!=ma.end();it++) { if(maxn<it->second) { maxn=it->second; maxx=it; } } cout<<maxx->first<<endl; } return 0;}
0 0
- HDU-1004 Let the Balloon Rise(STL: map)
- HDU 1004 Let the Balloon Rise(STL之map)
- HDU 1004 Let the Balloon Rise STL
- HDU 1004:Let the Balloon Rise【STl】
- 【STL】hdu 1004 Let the Balloon Rise
- HDU 1004 Let the Balloon Rise【Map】
- hdu 1004 Let the Balloon Rise map
- HDU 1004 Let the Balloon Rise(map)
- HDU 1004 Let the Balloon Rise map
- Let the Balloon Rise—STL(map)
- hdu 1004 Let the Balloon Rise(STL)
- 【HDU 1004】Let the Balloon Rise(STL+水题)
- hdu 1004 Let the Balloon Rise map的应用
- 【map热手题】HDU 1004—Let the Balloon Rise
- HDU 1004 Let the Balloon Rise Map的应用
- HDU 1004 Let the Balloon Rise(Map)
- Hdu 1004 Let the Balloon Rise map解决方法
- HDU-#1004 Let the Balloon Rise(字符串+map)
- 面试回顾与总结1
- 百鸡问题-小记
- 开通博客
- 编程练习--不同语言输出九九乘法表
- 6410开发板关于qt版本和移植的困惑
- HDU-1004 Let the Balloon Rise(STL: map)
- 面试总结
- 社会化海量数据采集爬虫框架搭建
- 用CMD文件对拍
- UVA-11995 I Can Guess the Data Structure!(STL:各容器的简单运用)
- 五月一号的详细任务布置
- win8.1 secureboot 未正确配置
- gethibernatetemplate() 空指针异常
- STP 2 - 关于生成树的思科命令