![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二分
Tearsゆ
破铜烂铁ACMer
展开
-
树上点分治 P4178 Tree
树上点分治 P4178 Tree原创 2022-09-12 20:57:00 · 287 阅读 · 0 评论 -
The 2019 ICPC Asia Shanghai Regional Contest H.Tree Partition(二分+树dp)
link 题意 一颗(n<=1e5)的树,要求把其分为(k<=n)个子树,要求每个子树的最大值最小 最大值最小 二分典中典 我们从下往上 如果发现一个树的大小 >mid 我们就切割它 #include <bits/stdc++.h> using namespace std; #define int long long //typedef long long ll; typedef pair<int,int> pii; #define x first原创 2022-05-24 12:37:11 · 67 阅读 · 0 评论 -
Codeforces Round #703 (Div. 2)D. Max Median 二分
link #include <bits/stdc++.h> using namespace std; #define int long long //typedef long long ll; typedef pair<int,int> pii; #define x first #define y second #define pb push_back #define inf 1e18 #define IOS std::ios::sync_with_stdio(false原创 2022-05-24 10:56:26 · 85 阅读 · 0 评论