All in All,( UVa, 10340 )
生活随笔
收集整理的這篇文章主要介紹了
All in All,( UVa, 10340 )
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
題目鏈接 :https://vjudge.net/problem/UVA-10340
注意數組開辟大小,太小會runtime error;
1 #include<stdio.h> 2 #include<string.h> 3 #define maxn 10000000 4 char s[maxn],t[maxn]; 5 6 int main() 7 { 8 while (scanf("%s %s",s,t)!=EOF) 9 { 10 int j = 0; 11 int len_s = strlen(s); 12 int len_t = strlen(t); 13 for (int i = 0;i < len_t;i++) 14 { 15 if(s[j] == t[i]) 16 { 17 j++; 18 } 19 } 20 if(j == len_s) 21 printf("Yes\n"); 22 else 23 printf("No\n"); 24 getchar(); 25 } 26 return 0; 27 }?
轉載于:https://www.cnblogs.com/Dicer/p/8470113.html
總結
以上是生活随笔為你收集整理的All in All,( UVa, 10340 )的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux下多节点SSH无密码互联实现
- 下一篇: 【luogu P3378 堆】 模板