ZOJ Problem Set - 1970 All in All
来源:互联网 发布:淘宝ebay代购靠谱吗 编辑:程序博客网 时间:2024/06/15 13:32
水!
#include <iostream>using namespace std;int main(){ string str1,str2; int len1,len2,i,cnt,j; while(cin>>str1>>str2) { len1 = str1.size(); len2 = str2.size(); j = 0; i = 0; cnt = 0; if(len1 > len2) {cout<<"No"<<endl;continue;} while(i <= len1&&j <= len2) { if(str1[i] == str2[j]) {cnt ++;i ++;j ++;} else j ++; } //cout<<cnt<<endl; if(cnt == len1+1) cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0;}
- ZOJ Problem Set - 1970 All in All
- ZOJ 1970 All in All
- ZOJ 1905 All in All
- ZOJ Problem Set - 1060 Sorting It All Out
- C++ template for ALL Combination Problem Set
- zoj 1970 || poj 1936 All in All(水题,想说爱你不容易 = =)
- Problem 018 ——UVa 10340 - All in All
- pku_1936 All in All
- 2098: All in All
- JOJ2098:All in All
- poj1936 All in All
- 10340 - All in All
- POJ1936--All in All
- POJ1936:All in All
- 10340 - All in All
- POJ1936《All in All》
- UVaOJ10340 - All in All
- 10340 - All in All
- joj2645
- 归并集
- execjs error when upgrade rails from 3.0.x to 3.1.0 [problem solved]
- Dhetti's Licensing Advice
- 关于“Unable to find vcvarsall.bat”错误
- ZOJ Problem Set - 1970 All in All
- shell实现文件处理详解
- ZOJ Problem Set - 1831 Substitution Cypher
- 一道生成树问题 poj2831
- 九月腾讯,创新工场,淘宝等公司最新面试十三题
- 排序N个比N^7小的数,要求的算法是O(n)
- 函数调用栈分析
- poj 3463(dijk贪心思想的应用)
- 苹果iOS和谷歌安卓用户界面风格对比及技术总结