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 silvere at 2006-03-08 23:08:16 on Problem 1936
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
	char s1[100000],s2[100000];
	int len1,len2;
	int i,j;
	while(scanf("%s%s",&s1,&s2)==2)
	{
		len1=strlen(s1);
		len2=strlen(s2);
		j=0;
		for(i=0;i<len1 && j<len2;i++)
		{
			while(s1[i]!=s2[j++])
				;
		}
		if(i=len1 && j<=len2)
			printf("Yes\n");
		else
			printf("No\n");
	}
}

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