| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 70926 | 石茂诤 | 字符串包含判断 | C++ | Accepted | 1 MS | 276 KB | 314 | 2024-04-20 15:48:45 |
# include<bits/stdc++.h> using namespace std; string s1,s2; int main(){ getline(cin,s1); getline(cin,s2); int i,j=0; for(i=0;i<=s1.length();i++){ if(s1[i]==s2[j]){ j++; if(j==s2.length()){ cout<<"yes"; return 0; } } else{ j=0; } } cout<<"no"; return 0; }