题目链接:https://www.luogu.com.cn/problem/P7297
分析
上代码
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
using namespace std;
int n,k;
int a[500001],b[51][51],dis[4000001],v[5000001];
int hd[5000001],tot;
char s[55];
struct node
{
int to,next,w;
}e[8000001];
void add(int x,int y,int w)
{
e[++tot]