1004 Let the Balloon Rise
来源:互联网 发布:犀牛软件 手机 编辑:程序博客网 时间:2024/05/16 09:10
#include<iostream>#include<string>#include<map>using namespace std;int main(){int n;while (cin >> n){if (n == 0)break;map<string, size_t> m;string color;while (n--&&cin >> color){++m[color];}map<string, size_t>::iterator iter = m.begin();for (map<string, size_t>::iterator iter1 = m.begin(); iter1 != m.end(); ++iter1)if (iter1->second > iter->second)iter = iter1;cout << iter->first << endl;}return 0;}练习使用关联容器map
0 0
- 1004 Let the Balloon Rise
- 1004 Let the Balloon Rise
- 1004 Let the Balloon Rise
- 1004let the balloon rise
- Let the Balloon Rise 1004
- 1004 Let the Balloon Rise
- Let the Balloon Rise(1004)
- 1004Let the Balloon Rise
- Let the Balloon Rise(1004)
- Let the Balloon Rise(1004)
- 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
- OJ------求int型数据在内存中存储时1的个数(二进制数中1的个数)
- 【HDU5826】physics(物理题 + 数学题)
- java变成最差实践
- 动态添加DataGridView Row Color
- MySQL查询数据
- 1004 Let the Balloon Rise
- GridView 组件的基本实现(本人也是个新手,哪里写的不对或者多余还请大家多多见谅)
- 链表
- 《React-Native系列》11、 图解RN布局之FlexBox,三分钟上手写RN界面
- ROS 学习 (1):publisher和subscriber消息 python
- iOS 修正拍出来的照片的方向
- Android studio的默认图标
- JDK里的设计模式
- ubuntu下git的使用