hdu2586How far away 最近公共祖先Lca tarjan算法
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2586 第一次用targan算法,留个模板。#include<stdio.h>#include<string.h>#define spot 40010#define edge 80010#define query 410struct stu{ int to,value,next;}
原创
2016-11-17 19:58:44 ·
809 阅读 ·
0 评论