缘由python蓝桥杯代码只能通过百分之70多的案例_编程语言-CSDN问答
这样题目不用那么复杂费尽,就如0到9只有10个元素统计一样就可以了.

cpp
void 单词分析最多字母次数并列字典最小输出()
{
string dc = "zaqwsxcdderfvbgtyhnjuhipopopuerjfalfdnasnvhqofoqwernafmsndfqwroiamsferoiqhfksdlfjaltokfdsmdfmjefojapofa";
int x = 0, j = 0, b = 0, s = 0, c[26]{};
//cin >> dc;
js:if (dc[j] != '\0')
{
x = dc[j] - 'a';
if (++c[x] >= b)
b = c[x], s = (c[s] < b || c[s] == b && s > x ? x : s);
++j; goto js;
}
cout << (char)('a' + s) << "\n" << b << "\n";
}
