
树分治!
xuanweiace
一个热爱算法竞赛的弱校ACMer路过。青大本,浙大硕,方向后端开发,菜鸡一枚,奋斗ing...
展开
-
【HDU - 5977】Garden of Eden(树分治)
题干: When God made the first man, he put him on a beautiful garden, the Garden of Eden. Here Adam lived with all animals. God gave Adam eternal life. But Adam was lonely in the garden, so God made Eve...原创 2019-10-31 21:01:30 · 330 阅读 · 0 评论 -
【POJ - 1741】Tree(树分治,容斥,点分治,模板题)
题干: Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u and v. Give an integer k,for every pair (u,v) of vertices is...原创 2019-09-06 15:59:06 · 330 阅读 · 0 评论