![](https://img-blog.csdnimg.cn/20190927151132530.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
树形dp
文章平均质量分 92
树形dp
_sky123_
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #701 (Div. 2) E. Move and Swap
题目链接You are given n−1n - 1n−1 integers a2,…,ana_2, \dots, a_na2,…,an and a tree with nnn vertices rooted at vertex 111. The leaves are all at the same distance ddd from the root.Recall that a tree is a connected undirected graph without cycles. The dis原创 2021-02-13 16:38:18 · 181 阅读 · 1 评论 -
2020ICPC南京 M.Monster Hunter
题目链接题目描述There is a rooted tree with nnn vertices and the root vertex is 111. In each vertex, there is a monster. The hit points of the monster in the iii-th vertex is hpihp_ihpi .Kotori would like to kill all the monsters. The monster in the iii-th ver原创 2020-12-23 22:59:49 · 715 阅读 · 0 评论 -
2020CCPC威海 C. Rencontre
题目链接Located at the easternmost tip of Shandon Peninsula, Weihai is one of the most famous tourist destinations all over China. There are beautiful hills, seas, bays, springs, islands, and beautiful beaches in Weihai. It is also a coastal city abundant in原创 2020-12-18 08:44:49 · 300 阅读 · 0 评论 -
Codeforces Round #688 (Div. 2) E. Dog Snacks
题目链接 Gildong is playing with his dog, Badugi. They're at a park that has $$$n$$$ intersections and $$$n-1$$$ bidirectional roads, each $$$1$$$ meter in length and connecting two intersections原创 2020-12-05 16:32:11 · 274 阅读 · 0 评论 -
2020 Multi-University Training Cont est 2 In Search of Gold
题目链接Problem DescriptionSunset got a map about an abandoned gold mine in the border town. The map shows that the gold mine consists of nnn rooms connected by n−1n−1n−1 bidirectional tunnels, forming a tree structure. The map is so strange that on the iii-原创 2020-08-29 09:14:41 · 170 阅读 · 0 评论 -
Boboniu and Jianghu
Since Boboniu finished building his Jianghu, he has been doing Kungfu on these mountains every day.Boboniu designs a map for his nnn mountains. He uses n−1n−1n−1 roads to connect all nnn mountains. Every pair of mountains is connected via roads.For the i原创 2020-08-16 15:42:29 · 301 阅读 · 4 评论