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 781778304 at 2011-08-18 22:05:53 on Problem 1936
Yes写成了YES。。。。AC代码
#include<iostream>
#include<string.h>
#include<string>
using namespace std;
int main()
{
	string s;
	string t;
	while(cin>>s>>t)
	{
		int i,j;
		int len_of_s=s.length();
		int len_of_t=t.length();
		for(i=0,j=0;i<len_of_s&&j<len_of_t;)
		{
			if(s[i]==t[j])
				i++;
			j++;
		}
		if(i==len_of_s)cout<<"Yes"<<endl;
		else           cout<<"No"<<endl;
	}
	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