Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:new

Posted by Liuran at 2006-07-25 16:53:24 on Problem 2136
In Reply To:new Posted by:boys at 2006-07-25 16:52:20
> #include <iostream>
> using namespace std;
> 
> int main()
> {
>    char c[4][73],*p;
>    int a[26]={0},i,j,max;
>    for(i=0;i<4;i++)
>    {
> 	   cin.getline(c[i],73);
>        for(p=c[i];*p!='\0';p++)
> 		   if(*p>='A'&&*p<='Z')
>             a[*p-'A']++;
>    }
>    max=a[0];
>    for(i=1;i<26;i++)
> 	   if(max<a[i])
> 		   max=a[i];
>    for(i=max;i>=1;i--)
>    {
> 	   for(j=0;j<26;j++)
> 	   {
> 		   if(a[j]>=i)cout<<"* ";
> 		   else cout<<"  ";
> 	   }
> 	   cout<<endl;
>    }
>    for(i=0;i<26;i++)
> 	   printf("%c ",'A'+i);
>    return 1;
>  }
> 

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator