- 博客(7)
- 收藏
- 关注
原创 路径统计
其实坑挺多的 主要是重边的问题 还有自己的一个错误 就是 else 的问题 在代码中有注释 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #define LL long long #define RE re...
2019-05-09 19:51:24
456
原创 星球大战
都在代码里了! #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int maxm = 200005 ; const int maxn = 400005 ; int n,m,head[maxn],to...
2019-05-07 21:03:44
231
原创 严格次小生成树
今天又把次小生成树写了一遍 收获还是挺大的 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define LL long long #define inf 1e15 + 7 #define RE register using namespace st...
2019-05-07 21:02:48
209
原创 树上差分
树上差分暂且发现有两个用处 : 1 求被所有路径共同覆盖的边 (运输计划) 2 将所有的点权值 + 1,求最后点的权值(松鼠的新家) https://blog.youkuaiyun.com/zhayan9qvq/article/details/54999472 ...
2019-05-04 08:05:47
207
2
原创 luogu 2253 好一个腰鼓
这是写过的第一道pushup最难写的线段树 记录的几个变量 : lv :区间最左边的值 rv:区间最右边的值 fl fr :区间从左(右)边开始可以延伸的最长的答案 fm :区间中间部分的最长的答案 单点修改的操作很简单 关键是区间合并 在合并的时候,最主要的是对大区间fm的修改 这是第一点 第二点是 如果两个区间合并时又有了新的答案(此处与fv,rv有关),那么需要进行一些比较复杂的操作 #in...
2019-05-04 08:05:34
120
原创 luogu 1967 货车运输(2)
突然发现dfs改成我自己的方式也可以的哦!!!!! include include include include include using namespace std; const int maxn = 100005; const int maxm = 100005; int n,m,head[maxn],father[maxn],top,depth[maxn...
2018-08-07 15:09:57
150
原创 洛古1967 货车运输
具体思路: 最大生成树 + 倍增LCA 首先感谢tqc大佬为我的耐心修改代码(你可能是改了个shi… …) 贴代码 include include include include include using namespace std; const int maxn = 100005; const int maxm = 100005; int n,m,h...
2018-08-07 15:04:49
177
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅