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

怎么回事???

Posted by 00411082 at 2005-04-23 11:33:52 on Problem 2406
请各位帮忙看看,怎么过不了?

#include<iostream.h>
#include<stdio.h>
void main()
{
	char t[1000000];
	int b,s;
	double a[26];
	while(1)
	{
		for(int i=0;i<26;i++)
		{
			a[i]=0;
		}
		s=b=0;
		scanf("%s",t);
		if(t[0]=='.') break;
		for(int l=0;t[l]!='\0';l++)
		{
			b=t[l]-'a';
			a[b]++;
		}
		for(int j=0;j<26;j++)
		{
			if(a[j]>s) s=a[j];
		}
		cout<<s<<endl;
	}
}

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