第二和第三两个点RE了,但是我下载下来用例发现答案一样啊,求助
#include <iostream>
#include <cstring>
#include <algorithm>
#include <unordered_map>
#include <vector>
#include <cmath>
#include <queue>
using namespace std;
#define x first
#define y second
typedef pair<int, int> PII;
const int N = 25, INF = 1e9;
int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};
int n;
string str[4];
int cnt[26];
int main()
{
for(int i = 0; i < 4; i ++)
{
getline(cin, str[i]);
}
for(int i = 0; i < 4; i ++)
{
for(int j = 0; j < str[i].size(); j ++)
cnt[str[i][j] - 'A'] ++;
}
int m = *max_element(cnt, cnt + 26);
for(int i = 0; i < m; i ++)
{
for(int j = 0; j < 26; j ++)
{
if(cnt[j] >= m - i) cout << "*";
else cout << " ";
if(j != 25) cout << " ";
}
cout << endl;
}
for(char i = 'A'; i <= 'Z'; i ++)
{
cout << i;
if(i != 'Z') cout << " ";
}
return 0;
}