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 yousiki at 2016-07-29 15:02:18 on Problem 1936
haha~~~
#include<cstdio>
#include<string>
#include<cstring>
#include<iostream>
using namespace std;
signed main(void) {
	ios::sync_with_stdio(false);
	string str1, str2;
	while (cin >> str1 >> str2) {
		int len1 = str1.length();
		int len2 = str2.length();
		for (int i = 0, j = 0;;) {
			if (str1[i] == str2[j] && ++i == len1) {
				printf("Yes\n");
				break;
			}
			if (++j == len2) {
				printf("No\n");
				break;
			}
		}
	}
}

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