POJ 2378 Tree Cutting——樹形dp

題意:給定一棵樹,如今要求刪除一個點,使得刪除這個點後獲得的每一個子樹的節點數都少於總結點數的一半,並輸出這個點,多個的話按從小到大的順序所有輸出ios 思路:相似於找數的重心spa #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int
相關文章
相關標籤/搜索