求助!!(第一个WA了)
  • 板块B2118 验证子串
  • 楼主xq_z
  • 当前回复6
  • 已保存回复6
  • 发布时间2022/6/11 11:40
  • 上次更新2023/10/27 23:33:56
查看原帖
求助!!(第一个WA了)
611614
xq_z楼主2022/6/11 11:40
#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;
} 
2022/6/11 11:40
加载中...