A669.子串判定 题解
2026-08-14 17:05:23
发布于:浙江
2阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c,s;
cin>>a>>b>>c;
s+=a;s+=b;//拼接
if(s.find(c)!=string::npos/*string::npos 没找到*/) cout<<c<<" is substring of "<<a<<" and "<<b;//find函数:寻找子串
else cout<<c<<" is not substring of "<<a<<" and "<<b;
return 0;
}
这里空空如也








有帮助,赞一个