Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
97996 | 任斌 | 字符串包含判断 | C++ | Accepted | 1 MS | 276 KB | 332 | 2024-11-17 10:17:42 |
#include<bits/stdc++.h> using namespace std; int main() { string a,b; int n=1; cin>>a>>b; for(int i=0;i<a.length();i++){ n=1; for(int j=i,k=0;k<b.length();k++,j++){ if(a[j]!=b[k]){ n=0; break; } } if(n==1){ cout<<"yes"<<endl; return 0; } } cout<<"no"<<endl; return 0; }