悬关,DEV样例全过,洛谷里CE
查看原帖
悬关,DEV样例全过,洛谷里CE
1333723
kervinyan楼主2024/10/13 14:18
#include<bits/stdc++.h>
using namespace std;
int main()
{
	char d[55], c[55];
	gets(d);
	gets(c);
	int flag = 0,len1 = strlen(d),len2 = strlen(c);
	int k = 0;
	if (strstr(d,c) != NULL) 
	{
		printf("%s is substring of %s", c, d);
	}
	else if (strstr(c,d) != NULL) 
	{
		printf("%s is substring of %s", d, c);
	}
	else 
	{
		printf("No substring");
	}
	return 0;
}
2024/10/13 14:18
加载中...