摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2586题意:给定一个图,有M个询问。每一次询问为询问u,v两个点的距离为多少?题解:LCA问题。 1 #include 2 #include 3 #include 4 #include 5 #in... 阅读全文
posted @ 2014-09-05 21:15 Der_Z 阅读(195) 评论(0) 推荐(0) 编辑
摘要: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3807题意:给一个图,有R个点C条边,会进行Q次询问。每次询问两个点u,v之间有没有为一条路... 阅读全文
posted @ 2014-09-05 14:03 Der_Z 阅读(221) 评论(0) 推荐(0) 编辑