暴力可过
#include <cstdio>#include <cstring>char mainStr[100010];char subStr[100010];int main(){ int subLen,index,mainLen; while(scanf(" %s %s",subStr,mainStr) != EOF) { index = 0; mainLen = strlen(mainStr); subLen = strlen(subStr); for(int i = 0; i < mainLen; ++i) { if(mainStr[i] == subStr[index]) ++index; if(index == subLen) break; } if(index == subLen) PRintf("Yes/n"); else printf("No/n"); } return 0;}新闻热点
疑难解答