杭电acm 1004 (Let the Balloon Rise)
来源:互联网 发布:大数据上市公司排名 编辑:程序博客网 时间:2024/05/24 20:06
#include<iostream>#include<map>#include<string>//如果不加此文件,下面cin>>color 将报错。using namespace std;int main(){ int N; while(cin>>N&&N) { map<string,int> balloon; string color; for(int i=0;i<N;i++) { cin>>color; balloon[color]++;//向容器中插入元素(容器中的第二个元素可以直接操作!) } map<string,int>::iterator bal;//迭代器用来遍历容器中的所有元素 int max=0; for(bal=balloon.begin();bal!=balloon.end();bal++)//获取balloon中key的最大value。 { if(bal->second>max) { max=bal->second; color=bal->first; } } cout<<color<<"\n"; } return 0;}
- Let the Balloon Rise(杭电ACM 1004)
- 杭电acm 1004 (Let the Balloon Rise)
- 杭电ACM 1004 “+Let+the+Balloon+Rise”
- 杭电ACM-1004 Let the Balloon Rise
- 杭电acm 1004 Let the Balloon Rise
- 杭电ACM----------1004 Let the Balloon Rise
- 杭电ACM 1004 Let the Balloon Rise
- 杭电ACM—1004 Let the Balloon Rise
- 杭电ACM(1004) Let The Balloon Rise
- 杭电ACM 1004 Let the Balloon Rise
- 杭电 1004[Let the Balloon Rise]
- 杭电 1004 Let the Balloon Rise
- 杭电 1004 Let the Balloon Rise
- 杭电 1004 Let the Balloon Rise
- 杭电1004 Let the Balloon Rise
- 杭电-1004 Let the Balloon Rise
- 杭电1004---Let the Balloon Rise
- 杭电1004-Let the Balloon Rise
- 连接数据库中的两张表
- 成为一名好的程序员
- 乔布斯一生都在模仿的偶像:两度从哈佛大学退学的发明家Edwin H. Land
- Ubuntu下配置qooxdoo
- UESTC 1425 Another LCIS
- 杭电acm 1004 (Let the Balloon Rise)
- 笔记本外接显示器无法调至最佳分辨率的问题
- WinEdt中添加和删除块注释的快捷键
- 华尔街日报:乔布斯葬礼已经于周五进行
- POJ 1523
- Oracle 更新 OPatch 工具版本 的方法 说明
- as中Astar自动寻路算法
- 《纽约时报》:乔布斯是伟大的暴君
- 这个怎么解决??未能加载文件或程序集