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

WA了啊!WHY WHY 请大家帮看一把哈!!

Posted by 20054953 at 2007-03-18 16:35:39 on Problem 1458
#include<iostream>
#include<string>
using namespace std;

main()
{ 
	char x[10000],y[10000];
	long i,j,k,t;
	while(cin>>x>>y)
	{
		i=0;
		t=0;
		k=0;
		while(i<strlen(y))
		{
            j=k;
			while(j<strlen(x))
			{
				if(y[i]==x[j])
				{
					t++;
					k=j+1;
					break;
				}
				j++;
			}
			i++;
		}		
		cout<<t<<endl;
	}
	return 0;
}

测试数据都通过了,可是杂个提交都是WA,大家帮看看是怎么一回事哈!!




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