Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
3463 孙浚轩 字符串包含判断 C++ Accepted 0 MS 256 KB 459 2024-06-08 17:12:23

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ string a,b; cin>>a>>b; int lenb=b.size(),frequency=a.size()-lenb; bool d; for(int i=0;i<frequency;i++){ d=1; for(int j=i,k=0;k<lenb;j++,k++){ if(a[j]!=b[k]){ d=0; break; } } if(d){ cout<<"yes"; return 0; } } cout<<"no"; return 0; }