码迷,mamicode.com
首页 > 其他好文 > 详细

POJ-1936-All in All

时间:2015-02-09 10:48:45      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:

题目:POJ-1936-All in All

水题。

 1 #include <iostream>
 2 #include<stdio.h>
 3 #include<stdlib.h>
 4 #include<string.h>
 5 #include<math.h>
 6 #include<algorithm>
 7 
 8 using namespace std;
 9 
10 char s[100010],t[100010];
11 
12 int main()
13 {
14     int i,j;
15     while(scanf("%s%s",s,t)!=EOF)
16     {
17         i=0;
18         for(j=0;j<strlen(t);j++)
19         {
20             if(s[i]==t[j]) ++i;
21         }
22         if(i==strlen(s)) printf("Yes\n");
23         else printf("No\n");
24     }
25     return 0;
26 }

 

POJ-1936-All in All

标签:

原文地址:http://www.cnblogs.com/alohagin/p/4280864.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!