| ||||||||||
| 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 | |||||||||
停止帖代码吧,没用的。你以为看代码是很有趣的事吗?尤其是一份没有ac的代码。多去看看书,看清楚输出输入到底怎么用的再做吧In Reply To:????Output Limit Exceeded: Posted by:clean at 2005-05-10 19:00:16 > #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