社区讨论
求助!!(第一个WA了)
B2118验证子串参与者 5已保存回复 6
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 6 条
- 当前快照
- 1 份
- 快照标识符
- @lo8rwwug
- 此快照首次捕获于
- 2023/10/27 23:33 2 年前
- 此快照最后确认于
- 2023/10/27 23:33 2 年前
CPP
#include<bits/stdc++.h>
using namespace std;
char a[1005],b[1005];
int main(){
cin.getline(a,1005);
cin.getline(b,1005);
if(strstr(a,b)!=NULL) cout<<b<<" is substring of "<<a;
else if(strstr(b,a)!=NULL) cout<<a<<" is substring of "<<b;
else cout<<"No substring";
return 0;
}
回复
共 6 条回复,欢迎继续交流。
正在加载回复...