标签:des style blog http color strong
Time Limit: 1000MS | Memory Limit: 30000K | |
Total Submissions: 27556 | Accepted: 11286 |
Description
Input
Output
Sample Input
sequence subsequence person compression VERDI vivaVittorioEmanueleReDiItalia caseDoesMatter CaseDoesMatter
Sample Output
Yes No Yes No
水题。
1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #define M 100005 5 char s[M]={0},t[M]={0}; 6 using namespace std; 7 int main() 8 { 9 while(scanf("%s %s",s,t)!=EOF){ 10 int i,j; 11 i=j=0; 12 while(s[i]&&t[j]){ 13 if(s[i]==t[j]){ 14 i++; 15 j++; 16 } 17 else j++; 18 } 19 if(s[i]) 20 printf("No\n"); 21 else printf("Yes\n"); 22 memset(s,0,sizeof(s)); 23 memset(t,0,sizeof(t)); 24 } 25 return 0; 26 }
poj 1936 -- All in All,布布扣,bubuko.com
标签:des style blog http color strong
原文地址:http://www.cnblogs.com/ubuntu-kevin/p/3856030.html