1 solutions
-
0
#include<bits/stdc++.h> using namespace std; int st[30]; const int N=110; char str[N]; int main() { for(int i=0;i<4;i++) { cin.getline(str,N); int n=strlen(str); for(int j=0;j<n;j++) { if(str[j]>='A'&&str[j]<='Z') { int t=str[j]-'A'; st[t]++; } } } int mv=0; for(int i=0;i<26;i++) { mv=max(mv,st[i]); } for(int i=mv;i>=1;i--) { for(int j=0;j<26;j++) { if(st[j]>=i) { cout<<"* "; } else { cout<<" "; } } cout<<endl; } for(int i=0;i<26;i++) { cout<<char('A'+i)<<" "; } return 0; }
Information
- ID
- 88
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 3
- Tags
- # Submissions
- 125
- Accepted
- 39
- Uploaded By