| ||||||||||
| 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 | |||||||||
我郁闷,不知道哪错了!!!!!#include <iostream>
using namespace std;
int main()
{
char a[2500],b[2500];
while(cin>>a>>b)
{
int sum=0,k=strlen(a),t=strlen(b),i,j;
for(i=0;i<k;i++)
{
for(j=sum;j<t;j++)
{
if(a[i]==b[j])
{
sum++;
break;
}
}
}
cout<<sum<<endl;
}
return 1;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator