hack & 请求撤下错误题解
查看原帖
hack & 请求撤下错误题解
572133
潘德理2010楼主2024/1/2 22:46

许多题解时间复杂度错误。

hack 生成器:

#include<bits/stdc++.h>
using namespace std;
int t=50,n=70,m=1e6;
int main(){
//	freopen("auto ac text_1.in","w",stdout);
	while(t--){
		printf("%d\n",n);
		for(int i=1;i<=n;i++){
			for(int j=1;j<=i;j++){
				putchar('a');
			}
			putchar('\n');
		}
		for(int i=1;i<=m;i++) putchar('a');
		putchar('\n');
	}	
	printf("0\n");
}

原理:被 hack 掉的代码没有拓扑建图优化,被卡成了 O(nm)O(nm)。

无法通过的题解(我已在洛谷上自己创建了一道私人题目并且经过测试发现以下题解均无法在五秒内跑完):

1 2 3 4 5 6 7 8 9 10 11 12

2024/1/2 22:46
加载中...