文章
4
粉丝
0
获赞
17
访问
2.3k
#include<bits/stdc++.h>
using namespace std;
int main(){
string str;
cin>>str;
unordered_map<char,int>map;
for(char c:str){
map[c]++;
}
int max=-1;
char best_char = 0;
for(auto const&x:map){
char c=x.first;
int count=x.second;
if(count>max){
max=count;
best_char=c;
}else if(count==max){
if(c<best_char){
best_char=c;
...
登录后发布评论
暂无评论,来抢沙发