"Luogu" 单调队列板子题。 很明显$$Ans=\max_{1≤i≤n} \{\sum_{j=1}^i P_i \min_{0≤k include include const int max_n = 500000 + 5; const int inf = 0x7f7f7f7f; int N, M ...
分类:
其他好文 时间:
2018-02-22 10:45:23
阅读次数:
81
#include #include #include using namespace std; #define N 100001 int n,a[N]; int front[N],nxt[N>1; if(x>1; if(xsiz[x]) all=tmp-siz[x]; root=0; getroot... ...
分类:
其他好文 时间:
2018-02-22 00:20:47
阅读次数:
182
图论算法 网络最大流模板【EK;Dinic】 EK模板 每次找出增广后残量网络中的最小残量增加流量 const int inf=1e9; int n,m,s,t; struct node{int v,cap;}; vector map[100010]; int flow[10010][10010]; ...
分类:
编程语言 时间:
2018-02-21 22:17:19
阅读次数:
179
题面: 传送门 思路: 既然最后一条边不能走,那么就一定是换了一条路,一条不经过这最后一条边的路 如果想要这条路最短,那么其在路上一定尽可能多地走了最短路径 因此,我们对这张图跑一遍从1开始的单源最短路,并建立出最短路径树 那么新的路径(1->u)一定是这样构成的:(1->v)+edge(v,w)+ ...
分类:
其他好文 时间:
2018-02-21 20:28:02
阅读次数:
133
P3171 "CQOI2015]网络吞吐量[https://www.luogu.org/problemnew/show/P3171" 题目描述 路由是指通过计算机网络把信息从源地址传输到目的地址的活动,也是计算机网络设计中的重点和难点。网络中实现路由转发的硬件设备称为路由器。为了使数据包最快的到达目 ...
分类:
其他好文 时间:
2018-02-21 17:09:36
阅读次数:
229
Shader的语法 Shader "name" { [Properties] Subshaders [Fallback] }(1)Properties:{ Property [Property ...] } 属性列表,如color、texture、float等。 name ("display nam ...
分类:
其他好文 时间:
2018-02-20 20:03:20
阅读次数:
185
题解:最大流 s连as bs at bt连t 求最大流是否==af+bf 但是这样不对 因为as可能流到bt 所以再 s连as bt at bs连t 再求一遍最大流 相当于让as流到bt的流流不过去 少打了一个+号WA了好几发 ...
分类:
其他好文 时间:
2018-02-19 21:12:12
阅读次数:
187
Summary The first aim of a bug report is to let the programmer see the failure with their own eyes. If you can't be with them to make it fail in front ...
分类:
其他好文 时间:
2018-02-17 19:22:51
阅读次数:
190
迷宫问题很容易可以理解为广度优先搜索问题,站在一个点上,首先试一试自己周围的点是否可以走,如果是路则加入待走队列,如果是墙则丢弃。迷宫问题在广度优先搜索的时候需要特别注意的就是要及时抛弃,遇到走过的点立即丢弃,遇到墙立即丢弃,不然时间复杂度就很高。 题目描述 Ignatius被魔王抓走了,有一天魔王 ...
分类:
其他好文 时间:
2018-02-17 17:32:57
阅读次数:
174