Run ID:122405
提交时间:2025-06-15 19:29:29
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ string a,b; int a_len,b_len,s=0; cin>>a>>b; a_len=a.size(); b_len=b.size(); for(int i=0;i<=a_len-b_len;i++){ s=0; for(int j=i;j<a_len;j++){ if(a[j]==b[s]){ s++; if(s==b_len){ cout<<"yes"; return 0; } } else{ break; } } } cout<<"no"; return 0; }