为啥换用C++98版本就可以通过的。。。
其他都是编译失败
gets()有什么问题吗
#include<bits/stdc++.h>
using namespace std;
int maze[27],maxn=-111;
char a[101];
int main(){
for(int i=1;i<=4;i++){
gets(a);
for(int j=0;j<strlen(a);j++){
if(a[j]<='Z' && a[j]>='A'){
maze[a[j]+1-'A']++;
maxn=max(maxn,maze[a[j]+1-'A']);
}
}
}
for(;maxn>0;maxn--){
for(int j=1;j<=26;j++){
if(maze[j]<maxn){
cout<<" ";
}else{
cout<<"* ";
}
}
cout<<endl;
}
for(int i=0;i<26;i++)cout<<(char)('A'+i)<<" ";
return 0;
}