摘要: 题意: 给出一棵树。 询问最少断几条边,使得存在大小为P的连通块。 题解: 以每个点为根节点跑树上背包即可。 时间复杂度$O(n^3)$ #include<bits/stdc++.h> using namespace std; const int maxn=200; int n,p; vector< 阅读全文
posted @ 2021-04-09 14:31 zlc0405 阅读(54) 评论(0) 推荐(0) 编辑