Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122406 刘珩宇 字符串包含判断 C++ Accepted 1 MS 276 KB 612 2025-06-15 19:30:23

Tests(10/10):


Code:

#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(){ int i,s=0,j,a1,b1; string a,b; cin>>a>>b; a1=a.size(); b1=b.size(); for(i=0;i<=a1-b1;i++){ s=0; for(j=i;j<a1;j++){ if(a[j]==b[s]){ s++; if(s==b1){ cout<<"yes"; return 0; } } else{ break; } } } cout<<"no"; return 0; }