摘要: LCA题意:询问LCA,不过图不连通,如果两点不连通输出那串英文否则输出两点间的距离,模板题#include <iostream>#include <cstdio>#include <cstring>using namespace std;#define N 10010#define M 10010#define Q 1000010int head[N];struct edge{ int u,v,w,next;}e[2*M];int __head[N];struct ask{ int u,v,lca,next;}ea[2*Q];int dir[N],fa[N 阅读全文
posted @ 2013-05-30 09:19 Titanium 阅读(872) 评论(1) 推荐(0) 编辑