Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135202 李馥甄 字符串包含判断 C++ Accepted 1 MS 276 KB 354 2025-11-02 18:12:38

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; int main(){ string a,b; cin>>a>>b; for(int i=0;i<a.size()-b.size()+1;i++){ bool flg=true; if(b[0]==a[i]){ for(int j=0;j<b.size();j++){ if(b[j]!=a[i+j]){ flg=false; break; } } if(flg){ cout<<"yes"; return 0; } } } cout<<"no"; return 0; }