#include <cstdio>
#include <cstring>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
const int inf = 1000000;
const int maxn = 105;
struct node{
int to,next;
}tree[maxn*2];
int len,head[maxn],n,m,w[maxn],pos[maxn],temp[maxn];
void init(){
memset(head,-1,sizeof(head));
len = 0;
}
void add_eadge(int u,int v){
tree[len].to = v;
tree[len].next = head[u];
head[u] = len++;
}
int d[maxn][maxn];
void dfs(int root,int f){
......
阅读全文