![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
「已注销」
不忘初心
展开
-
选择不相交区间
#include <iostream>#include <algorithm>using namespace std;const int maxn = 1000 + 10;struct node{ int s,t;}a[maxn];int n;bool cmp(node a,node b){ return a.t<b.t;}int solve()...原创 2019-06-18 18:12:06 · 220 阅读 · 0 评论 -
区间选点
#include <iostream>#include <algorithm>using namespace std;const int maxm = 5000 + 10;const int maxn = 3e4 + 10;struct node{ int s,t,num;}a[maxm];int n,m;bool vis[maxn];bool cmp(...原创 2019-06-18 18:36:57 · 369 阅读 · 0 评论 -
区间覆盖
#include <iostream>#include <algorithm>#include <cmath>using namespace std;const int maxn = 15000 + 10;//const int maxn = 3e4 + 10;struct node{ double s,t;}a[maxn];int n,tot...原创 2019-06-18 19:21:00 · 190 阅读 · 0 评论