#include<iostream>#include<cstdio>usingnamespace std;int n, m, tot, head[100010];struct node
{
int to, next, w;}b[1001000];int deep[100100], dis[100100];int f[100100][25];voidadd(int x,int y,int w){
b[++tot]=
思路:LAC板子题codecodecode#include<iostream>#include<cstdio>using namespace std;int n, m, tot, head[100010];struct node{ int to, next, w;}b[1001000];int deep[100100], dis[100100];int f[100100][25];void add(int x, int y, int w){ ..