摘要:
题意:给你一棵树,求两个点的最近公共祖先。 思路:因为只有一组询问,直接数组模拟好了。 (写得比较乱) 原题请戳这里#include #include #include #include using namespace std;int first[10005],v[10005],n... 阅读全文
posted @ 2016-04-10 23:28
SiriusRen
阅读(180)
评论(0)
推荐(0)
摘要:
裸的LCA,读入小坑。Tarjan算法大坑,一开始不知道哪儿错了,后来才发现,是vis数组忘了清零了(⊙﹏⊙)b 傻傻的用了邻接矩阵。。。很慢啊,1100多ms。Closest Common AncestorsDescriptionWrite a program that take... 阅读全文
posted @ 2016-04-10 12:38
SiriusRen
阅读(176)
评论(0)
推荐(0)
摘要:
Cow Marathon DescriptionAfter hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has co... 阅读全文
posted @ 2016-04-10 12:22
SiriusRen
阅读(168)
评论(0)
推荐(0)

浙公网安备 33010602011771号