请求加强数据
查看原帖
请求加强数据
943468
lizicheng3042楼主2023/4/13 14:06

以下是存在明显漏洞但能全AC的代码

#include<cstdio>
#include<cstring>
#include<string>
using namespace std;
********
********
void Dfs(*)
{
(为避免有在评论区刷题解的嫌疑删去部分内容)
	if(**>**) **;
	for(*)
	{
	**
	**
	**
	**
	while(o[a][u]!=o[q][y]&&u>=0){u--;
	}
	if(u<0) **
	for(u;u<strlen(o[a]);u++)
	{
		char t=o[a][u],k=o[q][y];
		if(t!=k)**
		else **
	}
	if(*){
	**
	Dfs(*);
	**
	}
	}
	return;
}
int main()
{
	scanf("%d",&n);
	for(int u=1;u<=n;u++){scanf("%s",&o[u]);
	}
	scanf("%s",&o[0]);
	Dfs(*);
	printf("%d",length);
	return 0;
}

hack数据: 1 eveoeveo 正确答案:12;实际输出答案:8
不是这么漏的算法也能过

2023/4/13 14:06
加载中...