Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
119673 毛靖平 字符串包含判断 C++ Accepted 1 MS 276 KB 409 2025-05-18 13:35:31

Tests(10/10):


Code:

#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ string s1,s2; int t=-1; cin>>s1>>s2; t=s1.find(s2); //find:查询s1中是否包含s2;如果包含返回第一次出现的位置 //如果没有;不会返回 if(t!=-1){ cout<<"yes"; } else{ cout<<"no"; } return 0; }