
树型Dp
绝尘花遗落
一骑红尘妃子笑,无人知是荔枝来
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Topcoder SRM 683 Div2 - C
树形Dp的题,根据题意建树。DP[i][0] 表示以i为根节点的树的包含i的时候的所有状态点数的总和Dp[i][1] 表示包含i结点的状态数目对于一个子节点vDp[i][0] = (Dp[v][1]+1)*Dp[i][0]+Dp[v][0]*Dp[i][1]表示子节点的所有状态与i的所有的状态之间的组合(可以不组合,所以DP[v][1]+1),接下来更新i的状态数目DP[i][1] = Dp[i][原创 2016-03-03 15:18:21 · 697 阅读 · 0 评论 -
【UVA11174】Stand in a Line——逆元+树形Dp
All the people in the byteland want to stand in a line in such a way that no person stands closer to the front of the line than his father. You are given the information about the people of the bytela原创 2016-03-27 19:53:19 · 625 阅读 · 0 评论 -
【LA3516】Exploring Pyramids——动态规划+乘法原理
Archaeologists have discovered a new set of hidden caves in one of the Egyptian pyramids. The decryption of ancient hieroglyphs on the walls nearby showed that the caves structure is as follows. Ther原创 2016-03-28 08:21:07 · 765 阅读 · 0 评论 -
2016中国大学生程序设计竞赛 - 网络选拔赛
HDU【5832】——A water problemHDU【5833】——Zhu and 772002HDU【5834】——Magic boy Bi Luo with his excited treeHDU【5835】——DanganronpaHDU【5839】——Special TetrahedronHDU【5842】——Lweb and String原创 2016-08-14 21:28:35 · 1956 阅读 · 0 评论 -
2016 Multi-University Training Contest 1
1001-【5723】——Abandoned countryTime Limit: 8000/4000 MS 【HDU5730】Shell Necklace——CDQ+FFT原创 2016-07-19 21:02:15 · 929 阅读 · 0 评论