P1273 有线电视网(树形dp)
https://www.luogu.com.cn/problem/P1273思路:dp[i][j]:以i为根的子树服务j个用户的最大收益。答案遍历到dp[i][j]>=0的时候更新最值#include<iostream>#include<vector>#include<queue>#include<cstring>#include<cmath>