请求撤下第一篇题解&加强数据
查看原帖
请求撤下第一篇题解&加强数据
365021
masterhuang楼主2023/8/23 16:52

构造一个边权全 11 的联通图即可卡掉第一篇题解,TLE。

造数据程序

#include<bits/stdc++.h>
#define P pair<int,int>
#define fi first
#define se second
#define LL long long
#define fr(x) freopen(#x".in","r",stdin);freopen(#x".out","w",stdout);
using namespace std;
const int N=1e5+5;
int tot;P a[N];
int main()
{
	freopen("1.in","w",stdout);
	srand(time(NULL));
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cout<<"100 1000\n";
	for(int i=1;i<100;i++) cout<<i<<" "<<i+1<<" 1\n";
	for(int i=1;i<=100;i++) for(int j=i+2;j<=100;j++) a[++tot]={i,j};
	random_shuffle(a+1,a+1+tot);
	for(int i=1;i<=1000-99;i++) cout<<a[i].fi<<" "<<a[i].se<<"\n";
	return 0;
}
2023/8/23 16:52
加载中...