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

感觉好简单啊,是不是很多人想复杂了。。。。一次AC,0ms。。

Posted by kensou97 at 2013-05-02 21:41:49 on Problem 1936
#include <stdio.h>
char s[100001];
char t[100001];
int main(void){
	int i,j;
	while(scanf("%s %s",s,t)!=EOF){
		i=0;
		j=0;
		while(s[i]&&t[j]){
			if(s[i]==t[j]){
				i++;
				j++;
			}else{
				j++;
			}
		}
		if(!s[i]){
			printf("Yes\n");
		}else{
			printf("No\n");
		}
	}
	return 0;
}

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