摘要: Luogu 1064 金明的预算方案 / CJOJ 1352 [NOIP2006] 金明的预算方案(动态规划) Description 金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间金明自己专用的很宽敞的房间。更让他高兴的是,妈妈昨天对他说:“你的房间需要购买哪些物品,怎么布置,你说了算, 阅读全文
posted @ 2017-07-11 21:18 SYCstudio 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Luogu 2245 星际导航(最小生成树,最近公共祖先LCA,并查集) Description sideman做好了回到Gliese 星球的硬件准备,但是sideman的导航系统还没有完全设计好。为了方便起见,我们可以认为宇宙是一张有N 个顶点和M 条边的带权无向图,顶点表示各个星系,两个星系之间 阅读全文
posted @ 2017-07-11 16:30 SYCstudio 阅读(463) 评论(0) 推荐(0) 编辑
摘要: POJ 1986 Distance Queries / UESTC 256 Distance Queries / CJOJ 1129 【USACO】距离咨询(最近公共祖先) Description Farmer John's cows refused to run in his marathon s 阅读全文
posted @ 2017-07-11 15:04 SYCstudio 阅读(328) 评论(0) 推荐(0) 编辑
摘要: POJ 1470 Closest Common Ancestors(最近公共祖先 LCA) Description Write a program that takes as input a rooted tree and a list of pairs of vertices. For each 阅读全文
posted @ 2017-07-11 14:10 SYCstudio 阅读(352) 评论(0) 推荐(0) 编辑
摘要: POJ 1330 Nearest Common Ancestors / UVALive 2525 Nearest Common Ancestors (最近公共祖先LCA) Description A rooted tree is a well known data structure in comp 阅读全文
posted @ 2017-07-11 12:58 SYCstudio 阅读(401) 评论(0) 推荐(0) 编辑
摘要: POJ 2152 fire / SCU 2977 fire(树型动态规划) Description Country Z has N cities, which are numbered from 1 to N. Cities are connected by highways, and there 阅读全文
posted @ 2017-07-11 10:09 SYCstudio 阅读(290) 评论(0) 推荐(0) 编辑
摘要: HDU 3829 Cat VS Dog / NBUT 1305 Cat VS Dog(二分图最大匹配) Description The zoo have N cats and M dogs, today there are P children visiting the zoo, each chil 阅读全文
posted @ 2017-07-11 08:47 SYCstudio 阅读(299) 评论(0) 推荐(0) 编辑