【LOJ101】最大流(Dinic)
problem给定n个点,m条边的有向图求源点s到汇点的最大流solution最大流模板,,不会看笔记吧。。。codes#include#include#include#includeusingnamespacestd;…
problem给定n个点,m条边的有向图求源点s到汇点的最大流solution最大流模板,,不会看笔记吧。。。codes#include#include#include#includeusingnamespacestd;…
problem给出n个正整数,然后有m个询问询问该整数是否在n个正整数中出现过solution哈希表?当然是set水洛codes#include#includeusingnamespacestd;sets;intmain…
problemsolutioncodes#includeusingnamespacestd;constintmaxn=100010;#definelchp>m;for(inti=1;i>op;if(op==1){cin>…
problemsolutioncodes#includeusingnamespacestd;constintmaxn=100010;#definelchpm;for(inti=1;i>op>>x>>y;if(op==1)…
problemsolutioncodes//不好玩#includeusingnamespacestd;intn,m,a[30010],r,p;intmain(){cin>>n>>m;for(inti=1;i1){p=(p…
problemsolutioncodes#include#includeusingnamespacestd;structpeo{intw,id;}hum[50010];boolcmp(peoa,peob){returna…
problem给定n个点,m条边的有向图求源点s到汇点的最大流solution最大流模板,,不会看笔记吧。。。codes//Edmonds-Karp#include#include#include#includeusin…
problem将n个罪犯分别关押进2座监狱每2个罪犯之间有一个冲突值,当他们在同一监狱时就会爆发让爆发的冲突值(最大的那个)最小,求那个最小值solution考虑判定:是否存在一种分配方案,使最大的冲突值不超过mid。当…
problem给出一个n*n的矩阵,每一格有一个非负整数A[i][j],(Aij
problem(==、可读版本)最近,佳佳迷上了一款好玩的小游戏:antbuster。游戏规则非常简单:在一张地图上,左上角是蚂蚁窝,右下角是蛋糕,蚂蚁会源源不断地从窝里爬出来,试图把蛋糕搬回蚂蚁窝。而你的任务,就是用原…