HDOJ 1029 STL MAP
来源:互联网 发布:知乎可以匿名发文章吗 编辑:程序博客网 时间:2024/05/18 02:04
#include"iostream"#include"map"using namespace std;int main(){//freopen("a.txt","r",stdin);int i,n;while(cin>>n){map<int,int>a; while(n--){cin>>i; //输入一个数a[i]++; //数字相同的second会向上加 例如: 1 1 1 2 2 第一个数的first为1second为1 第二个数的first为1second为2}int maxi=0,max=0;for(auto p=a.begin();p!=a.end();p++){ if(p->second>max) { max=p->second; maxi=p->first; }}cout<<maxi<<endl;}return 0;}
0 0
- HDOJ 1029 STL MAP
- hdoj 4941 Magical Forest 【STL map】
- HDOJ 2736 Surprising Strings——c++STL(map)
- HDOJ 题目1251统计难题(STL-map)
- hdoj 1075 What Are You Talking About 【STL map+string】
- hdoj 3172 Virtual Friends 【并查集 + STL map】
- STL-map
- stl -map
- stl map
- STL Map
- STL---map
- STL(MAP)
- STL(map)
- STL--map
- STL map
- stl map
- STL map
- STL----map
- 用Handler与Timer实现progressDialog倒计时
- css三列布局,中间div固定,两侧div宽度自适应
- EasyAR-Unity SDK使用文档
- AsyncTask的基本用法
- [Q学习]QT对象模型:标识与值
- HDOJ 1029 STL MAP
- DP————1016
- 常用类
- LR结果分析设置是否包括think time
- 《AngularJS》——scope的绑定策略
- 异常
- EditText(输入框)详解
- 第三章习题
- 二级缓存设置三部曲