| ||||||||||
| 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 | |||||||||
WA了啊!WHY WHY 请大家帮看一把哈!!#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator