标签:return 文件 isa ring auto names line pe头文件 头文件
#include<iostream>
#include<map>
#include<cctype>
using namespace std;
int main(){
string t, s;
map<string, int> mp;
getline(cin, s);
for(int i = 0; i < s.length(); i++){
if(isalnum(s[i])){
s[i] = tolower(s[i]);
t += s[i];
}
if(!isalnum(s[i]) || i == s.length()-1){
if(t.length() != 0) mp[t]++;
t = "";
}
}
int maxn = 0;
for(auto it = mp.begin(); it != mp.end(); it++){
if(it->second > maxn){
maxn = it->second;
t = it->first;
}
}
cout << t << " " << maxn;
return 0;
}
标签:return 文件 isa ring auto names line pe头文件 头文件
原文地址:https://www.cnblogs.com/tsruixi/p/11924225.html