最短路
很容易想到边和边之间连边,但是这样菊花图就完蛋了
我们想办法优化一下,能不能不要每条边都连。
考虑查分,把一个点的出边串起来,这样就行了,每条无向边拆成两条就能保证了
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e5 + 5; namespace IO { const int Maxlen = N * 50; char buf[Maxlen], *C = buf; int Len; inline void read_in() { Len = fread(C, 1, Maxlen, stdin); buf[Len] = '