Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
????Output Limit Exceeded:#include<iostream> using namespace std; int main() { char a[4][72],A[72],B[72],C[72],D[72]; int star[27],i,j,max,temp=0; cin.getline(A,72); cin.getline(B,72); cin.getline(C,72); cin.getline(D,72); for(j=0;j<72;j++) { a[0][j]=A[j]; a[1][j]=B[j]; a[2][j]=C[j]; a[3][j]=D[j]; } for(i=0;i<27;i++) star[i]=0; for(i=0;i<4;i++) for(j=0;j<72;j++) { if(a[i][j]>='A'&&a[i][j]<='Z') { temp=static_cast<int>(a[i][j]-'@'); star[temp]++; } } for(i=0;i<27;i++) { if(star[i]>max) max=star[i]; } for(j=max;j>0;j--) { for(i=1;i<27;i++) { if((star[i]-j)>=0) cout<<"*"; else cout<<" "; cout<<" "; } cout<<endl; } cout<<"A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"; return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator