
RMQorLCA
文章平均质量分 80
Dwylkz
no best, but coordination
展开
-
Zoj 3195 Design the city
Obviously, it's kind of LCA problem. I assume that you guys have already learned about LCA stuff :). So I just talk about the main idea of my method. Our goal is to connect three specific node by u原创 2012-08-22 10:53:06 · 641 阅读 · 0 评论 -
hdu 4409 Family Name List
/* Three operations L : the same as input, correspond to Preorder traversal. b x : correspond to ask how many sons does x's father have. c x y : LCA(x, y), there is a trick, if LCA(x, y)原创 2012-09-24 12:48:15 · 793 阅读 · 0 评论