自己能想到的案例都试了,符合题目要求。1.aaaabbbcc2.aaaabbbccc #include <iostream> #include <vector> #include <map> using namespace std; int main() { int n = 0; cin >> n; string s; cin >> s; map<char,int> hash; for(char e: s) { hash[e]++; } ...