下载数据吧
by Schwarzkopf_Henkal @ 2019-12-30 12:14:43
这是我代码,不许抄袭
by 李禹墨 @ 2020-01-05 16:16:46
```
#include<bits/stdc++.h>
#define fio ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
int a[26] = {0};
int main() {
string s="", ss;
for (int i = 0; i < 4; i++) {
getline(cin, ss);
s += ss;
}
int max = 0;
for (int i = 0; i < s.length(); i++) {
if (isalpha(s[i])) {
a[s[i]-'A']++;
if (max < a[s[i]-'A']) max = a[s[i]-'A'];
}
}
/*
for (int i = 0; i < 26; i++) {
printf("%c %d\n",i+'A', a[i]);
}
*/
for (int i = max; i >= 1; i--) {
for (int j = 0; j < 26; j++) {
if (j != 25) {
if (a[j] >= i) cout <<"* ";
else cout << " ";
} else {
if (a[j] >= i) cout <<"*";
else cout << " ";
}
}
cout << endl;
}
cout << 'A';
for (int i = 1; i < 26; i++) {
printf(" %c", i+'A');
}
}
```
by 李禹墨 @ 2020-01-05 16:17:02