70 pts #1 #3 #10
查看原帖
70 pts #1 #3 #10
1445328
sunqikai0805楼主2025/6/18 22:01
#include<bits/stdc++.h>
//#define ll long long

using namespace std;

int n,maxx = -1;

string mw = "";

map<string,int> mp;

string zhuanxiaoxie(string a){
	string g = "";
	for(int i = 0;i <= a.size();++i) g += tolower(a[i]);
	return g;
}

signed main(){
	cin.tie(0)->sync_with_stdio(0);
	//freopen("a.in","r",stdin);
	//freopen("a.out","w",stdout);
	cin >> n;
	string m;
	for(int i = 1;i <= n;++i){
		cin >> m;
		mp[zhuanxiaoxie(m)]++;
		if(mp[zhuanxiaoxie(m)] > maxx) mw = zhuanxiaoxie(m);
	}
	for(int i = 0;i <= mw.size();++i){
		if(mw[i] != ' ') cout << mw[i];
		else break;
	}
	return 0;
}

70 pts #1 #3 #10

2025/6/18 22:01
加载中...