U254580 P3264 [JLOI2015]管道连接(加强版)
题目描述
见原题 [P3264](https://www.luogu.com.cn/problem/P3264)
数据见附件,如果有更强的数据请私信我 qwq
```
TLE:
https://www.luogu.com.cn/blog/user17952/solution-p3264
https://www.luogu.com.cn/blog/ducati/solution-p3264
https://www.luogu.com.cn/blog/xiaomuchongzi/solution-p3264
WA:
https://www.luogu.com.cn/blog/danieljiang/jloi2015-guan-dao-lian-jie-ti-xie-zui-xiao-si-tan-na-sen-lin
https://www.luogu.com.cn/blog/hentai008/solution-p3264
不知道为什么没卡掉的SPFA:
https://www.luogu.com.cn/blog/wyt2357/solution-p3264
https://www.luogu.com.cn/blog/horsepower2001/solution-p3264
https://www.luogu.com.cn/blog/lc-2018-Canton/solution-p3264
```
数据生成器1:
```cpp
// SLF ?
#include
using namespace std;
#define int long long
#define INF 0x3f3f3f3f3f3f3f3f
void up(int &x,int y) { x < y ? x = y : 0; }
void down(int &x,int y) { x > y ? x = y : 0; }
#define N ((int)())
mt19937_64 rd(time(0) + 114514);
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
// freopen("check.in","r",stdin);
// freopen("check.out","w",stdout);
freopen("spfa1.in","w",stdout);
const int n = 1000, m = n*2-2, p = 10;
printf("%lld %lld %lld\n",n,m,p);
for(int i=n; i>=2; i--)
printf("1 %lld %lld\n%lld %lld 1\n",i, (n - i + 1)*2 + 1, i, i - 1);
for(int i=1; i y ? x = y : 0; }
#define N ((int)(1e3+15))
struct Edge{ int u,v,w; };
vector vec;
int a[N*N + 14], id[N][N];
mt19937_64 rd(time(0) + 114514);
int w() { return rd() % 20000; }
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
// freopen("check.in","r",stdin);
// freopen("check.out","w",stdout);
freopen("spfa2.in","w",stdout);
const int n = 7, m = 94, p = 10;
static int t = 0;
for(int i=1; i
输入格式
无
输出格式
无