[NOI2008] volunteer recruitment (linear programming - dual problem - cost flow)

problem luogu-P3980 solution Volunteers work continuously [ s i , t i ] [s_i,t_i] ...

Posted by KevinCB on Sun, 06 Mar 2022 08:57:04 +0100

[GDOI2013] explanation of letter connection

Problem surface There is a game in which a lattice of m rows and n columns is given on the plane. There are obstacles on some grids, and there may be English letters on grids without obstacles. Now it is required to establish a path on the empty grid, so that there is a letter at both ends of each path, and the letters at both ends are differe ...

Posted by paparanch on Sat, 19 Feb 2022 10:34:11 +0100

1079. [GDKOI2007] Naxxramas

Description "Heroes, the scourge of the dead has invaded the villages around storm city. For the future of Azera world, let's fight the enemy hand in hand!" The prophet eternized summoned the leaders of the alliance and tribe to form a crusade army to fight Naxxramas, the headquarters of the victims of natural disasters. Three days la ...

Posted by QSDragon on Fri, 21 Jan 2022 09:45:13 +0100

Network flow - bipartite graph matching - pilot pairing scheme problem - network flow question 24 - Luogu P2756

Network flow - bipartite graph matching - pilot pairing scheme problem - network flow question 24 - Luogu P2756 Title Description There are n pilots in total, including M foreign pilots and (n - m) British pilots. Foreign pilots are numbered from 1 to m and British pilots are numbered from m + 1 to n. For a given cooperation between foreign p ...

Posted by daven on Fri, 24 Dec 2021 17:14:17 +0100

Network flow problem selection

There are boards here Maximum flow view code namespace Flow { int tot=1,fi[N],ne[M],to[M],w[M],S,T,d[N],nn; inline void add(int x,int y,int c) { ne[++tot]=fi[x],fi[x]=tot,to[tot]=y,w[tot]=c; ne[++tot]=fi[y],fi[y]=tot,to[tot]=x,w[tot]=0; } inline bool bfs() { fill(d+1,d+nn+1,-1);d[S]=0; queue<int>q;q.push(S); while(!q.empt ...

Posted by kycan on Fri, 29 Oct 2021 08:46:35 +0200