#NOIP 2014# day.2 T2 寻找道路
先把满足要求的点找出来,在满足要求的点的新图上求个最短路即可。
#include <queue>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int Maxn = 10010, Maxm = 200010;
void fr() {
freopen("road.in","r",stdin);
freopen("road.out","w",stdout);
}
//
struct edge {
int to; edge *next;
}E[Maxm << 1], *head[Maxn], *fhead