摘要:
题意 ~~[题目链接]~~这怎么发链接啊。。。。。 Sol 枚举一个断点,然后类似于LIS一样dp一波 这个边界条件有点迷啊。。fst了两遍。。。 cpp include using namespace std; const int MAXN = 1e5 + 10, INF = 1e9 + 7; i 阅读全文
摘要:
题意 "题目链接" Sol 比较套路吧,设$f[i][j]$表示以$i$为根的子树中选了$j$个黑点对答案的贡献 然后考虑每条边的贡献,边的两边的答案都是可以算出来的 转移的时候背包一下。 cpp include define Pair pair define fi first define se 阅读全文