Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
109888 叶城俊 字符串包含判断 C++ Wrong Answer 1 MS 272 KB 356 2025-02-13 11:12:28

Tests(1/10):


Code:

#include <bits/stdc++.h> using namespace std; string s,x; int main() { cin>>s>>x; if(s.size()<x.size()){ cout<<"no"; return 0; } int a=0; a<=x.size(); for(int i=0;i<s.size();i++){ if(s[i]==x[a]){ a++; if(a=x.size()){ cout<<"yes"; return 0; } } else a=0; } cout<<"no"; return 0; }


Run Info:

------Input------
fdcdgtofze dgtf
------Answer-----
no
------Your output-----
yes