zoj 2104 Let the Balloon Rise
来源:互联网 发布:p2p网络摄像头软件app 编辑:程序博客网 时间:2024/05/16 16:13
#include "iostream"#include "string"#include "vector"using namespace std;struct ballons{string color;int count;};int main(){int N, i;vector<ballons> v;vector<ballons>::iterator it;ballons temp;bool tag;while (cin >> N && N){v.clear();for (i = 0; i < N; i++){cin >> temp.color;temp.count = 1;tag = false;for (it = v.begin(); it != v.end(); it++){if ((*it).color == temp.color){(*it).count++;tag = true;}}if (!tag)v.push_back(temp);}int max = 0;string ans;for (it = v.begin(); it != v.end(); it++){if ((*it).count > max){max = (*it).count;ans = (*it).color;}}cout << ans << endl;}}
- zoj 2104 Let the Balloon Rise
- ZOJ 2104 Let the Balloon Rise
- ZOJ 2104 Let the Balloon Rise
- ZOJ 2104 Let the Balloon Rise
- zoj 2104 Let the Balloon Rise
- ZOJ 2104Let the Balloon Rise
- ZOJ Problem Set - 2104 Let the Balloon Rise
- ZOj 2104——Let the Balloon Rise
- ZOJ Problem Set - 2104 Let the Balloon Rise
- zoj 2104.Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- Let the Balloon Rise
- zoj 1915 Above Average
- 为ListView创建ContextMenu
- LuaPlus新手使用方法(转)
- 自己的连手的jquery2
- zoj 1949 Error Correction
- zoj 2104 Let the Balloon Rise
- zoj 2108 Elevator
- 2012-03-31
- mysql LOAD DATA INFILE 使用
- 对mempool 的看法, 是否有必要实现 mempool
- zoj 2172 Symmetric Order
- LOAD DATA INFILE
- c#多线程1
- zoj 2208 To and Fro