80分,#1 WA
查看原帖
80分,#1 WA
1103166
Ly145666楼主2024/5/26 15:13
using namespace std;
int x,y,z;int a[10006];
string k,l;
int main()
{
	getline(cin,k);
	getline(cin,l);
	x=l.find(k);
	if(x!=-1)
	{
		cout<<k<<" is substring of "<<l;
		return 0;
	}
	
	else
	{
		x=k.find(l);
		if(x!=-1)
		{
			cout<<l<<" is substring of "<<k;
			return 0;
		}
	}
	cout<<"No substring";
	return 0;
 } c

2024/5/26 15:13
加载中...