[USACO08JAN]Cell Phone Network】的更多相关文章

题目大意: 给你一个n个结点的树,请你搞一些破坏. 你可以选择手动弄坏某个点,那么与它直接相连的点也会自动坏掉. 问你把整棵树搞坏至少要手动弄坏几个点? 思路: f[0~2][i]表示不同状态下以i为根的子树至少要手动弄坏几个点. 我们可以把点的不同状态分为以下三种: 0:它的孩子有被手动弄坏的. 1:它自己被手动弄坏. 2:它父母被手动弄坏. 设当前根为x,枚举每个孩子y,一个固定的手动弄坏的孩子z,转移方程如下: f[0][x]=sum{min(f[0][y],f[1][y])|y≠z}+f…
[USACO08JAN]手机网络Cell Phone Network 题目描述 Farmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to set up cell phone towers on his N (1 ≤ N ≤ 10,000) pastures (convenie…
P2899 [USACO08JAN]手机网络Cell Phone Network 题目描述 Farmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to set up cell phone towers on his N (1 ≤ N ≤ 10,000) pastures (co…
POJ 3659 Cell Phone Network / HUST 1036 Cell Phone Network(最小支配集,树型动态规划,贪心) Description Farmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to set up cell phone tow…
Cell Phone Network Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6781   Accepted: 2429 Description Farmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires hi…
E - Cell Phone Network POJ - 3659 题目大意: 给你一棵树,放置灯塔,每一个节点可以覆盖的范围是这个节点的所有子节点和他的父亲节点,问要使得所有的节点被覆盖的最少灯塔数量. 考虑每一个节点要被覆盖应该如何放置灯塔. 如果一个节点被覆盖 1 该节点放了灯塔  2 该点的父亲节点放了灯塔  3 该点的儿子节点放了灯塔. dp[u][0] 表示这个节点的儿子节点放了灯塔 dp[u][1] 表示这个点本身放了灯塔 dp[u][2] 表示这个点的父亲节点放了灯塔 转移方程,…
B - Strategic game POJ - 1463   题目大意:给你一棵树,让你放最少的东西来覆盖所有的边   这个题目之前写过,就是一个简单的树形dp的板题,因为这个每一个节点都需要挺好处理的. 这个树形dp是从底往根部来递推,所以每一个点,都是由它的根节点来递推的. 如果一个根节点的子节点放了东西,那么这个根节点就可以有选择,但是如果没有放东西,那么这个根节点就必须放东西. E - Cell Phone Network POJ - 3659   题目大意:给你一棵树,让你用最小的东…
P2899 [USACO08JAN]手机网络Cell Phone Networ题目描述 Farmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to set up cell phone towers on his N (1 ≤ N ≤ 10,000) pastures (conv…
题目描述 Farmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to set up cell phone towers on his N (1 ≤ N ≤ 10,000) pastures (conveniently numbered 1..N) so they can all…
题目描述 Farmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to set up cell phone towers on his N (1 ≤ N ≤ 10,000) pastures (conveniently numbered 1..N) so they can all…