Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <bits/stdc++.h>using namespace std;#define clr(a, x) memset(a, x, sizeof(a))#define mp(x, y) make_pair(x, y)#define pb(x) push_back(x)#define X first#define Y second#define fastin \ios_base::sync_with_stdio(0); \cin.tie(0);typedef long long ll;typedef long double ld;typedef pair<int, int> PII;typedef vector<int> VI;const int INF = 0x3f3f3f3f;const int mod = 1e9 + 7;const double eps = 1e-6;struct Edge{int from, to, cost;Edge(int u, int v, int w) : from(u), to(v), cost(w) {}};const int N = 10005;vector<Edge> edges;vector<int> G[N];inline void AddEdge(int u, int v, int w){edges.pb(Edge(u, v, w));