标签:ide job single let print iterator names for each
传送门:
http://acm.hdu.edu.cn/showproblem.php?pid=1004
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 143275 Accepted Submission(s): 56670
#include<bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n,n) { map<string,int> mm; map <string,int>::iterator it; string ch; for(int i=0;i<n;i++) { cin>>ch; mm[ch]++; } int sum=0; string str; for(it=mm.begin();it!=mm.end();it++) { if(it->second>sum) { sum=it->second; str=it->first; } } cout<<str<<endl; } return 0; }
标签:ide job single let print iterator names for each
原文地址:https://www.cnblogs.com/yinbiao/p/9295827.html