Run ID:70926
提交时间:2024-04-20 15:48:45
# include<bits/stdc++.h> using namespace std; string s1,s2; int main(){ getline(cin,s1); getline(cin,s2); int i,j=0; for(i=0;i<=s1.length();i++){ if(s1[i]==s2[j]){ j++; if(j==s2.length()){ cout<<"yes"; return 0; } } else{ j=0; } } cout<<"no"; return 0; }