蓝桥杯 国王的烦恼
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int maxn = 1e5+5;
int n, m, pre[maxn];
struct node
{
int u, v, d;
bool operator <(const node &a) const
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int maxn = 1e5+5;
int n, m, pre[maxn];
struct node
{
int u, v, d;
bool operator <(const node &a) const