Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
3464 | 孙浚轩 | 字符串包含判断 | C++ | Accepted | 0 MS | 264 KB | 402 | 2024-06-08 17:12:39 |
#include<iostream> using namespace std; int main(){ string a,b,tempstr; cin>>a>>b; int lenb=b.size(),frequency=a.size()-lenb,temp; for(int i=0;i<frequency;){ tempstr="",temp=i+lenb; for(;i<temp;i++) tempstr+=a[i]; if(tempstr==b){ cout<<"yes"; return 0; } i-=lenb-1; } cout<<"no"; return 0; }