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:一次刷过。贴个代码:

Posted by s595788087 at 2011-04-15 20:13:23 on Problem 2136
In Reply To:一次刷过。贴个代码: Posted by:0810311106 at 2009-09-12 16:48:15
> #include"stdio.h"
> #include"string.h"
> int main()
> {
> 	char a[110];
>     int map[100]={0};
>     int i,j,max=0;
>     for(i=0;i<4;i++)
>     {
>     	gets(a);
>     	for(j=0;j<strlen(a);j++)
>     	if(a[j]>='A'&&a[j]<='Z')
>     	{
>     		map[a[j]]++;
>     	    if(max<map[a[j]])
>     	    max=map[a[j]];
>     	}
>     }
>     for(j=max;j>=1;j--)
>      {
>     	for(i='A';i<='Z';i++)
>           {
>             if(map[i]<j)
>                printf("  ");
>             else
>              {
>        	        map[i]--;
>        	        printf("* ");
>              }
>           }
>           printf("\n");
>     }
>     for(i='A';i<='Z';i++)
>     printf("%c ",i);
>     return 0;
> }

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