下笔春蚕食叶声。
上一页 1 ··· 23 24 25 26 27
摘要: 浮水法 简单来说就是水上浮着n条线段,由下至上上浮,浮到一半有重叠了就换其中一半继续浮。 ————————————1 ——————————2 ——3 ——————————4 ————————————————————5 _________6 如图6上浮,5无重叠,上浮,5有重叠,截去一半继续浮,之后上 阅读全文
posted @ 2020-03-14 08:10 ACwisher 阅读(562) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; typedef long long ll; #define debug prllf("*"); //#define mo 1e9+7 const ll N=1e5+5; ll n,m,x[N],st[N][20 阅读全文
posted @ 2020-02-22 17:36 ACwisher 阅读(152) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; typedef long long ll; #define debug printf("*"); //#define mo 1e9+7 const int N=2e5+5,M=2e5+5,change=1e6+ 阅读全文
posted @ 2020-02-22 15:24 ACwisher 阅读(138) 评论(0) 推荐(0)
摘要: 树形背包 自底向上或自顶向下,dp两遍 树的直径/树的倍增 树上贪心 树形背包 HDU-4003 一个一个合并子节点 树上贪心 一棵树,上有m条路径(a,b),选择尽可能多的路径,使得没有两条路径有公共点 假如树是一条链,问题就转化为最多选择多少区间使得所有区间不相交 一个性质:每个点最多只能被一条 阅读全文
posted @ 2020-02-20 21:36 ACwisher 阅读(105) 评论(0) 推荐(0)
摘要: 看到题我第一反应就是while循环 但是我竟然想正着推,失败,卡了十几分钟 后来我回来看到第三组测试数据 想到倒推 但是没坚持 于是我又卡了很久 过会我又回来想 AC了。。。 这个故事告诉我们,要努力找规律~ #include<bits/stdc++.h>//万能库 using namespace 阅读全文
posted @ 2019-07-25 14:07 ACwisher 阅读(123) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27