随笔分类 - 图论板子
摘要:struct MCMF { struct edge { int to, cap, cost, rev; //edge() {} //edge(int to, int _cap, int _cost, int _rev) : to(to), cap(_cap), cost(_cost), rev(_rev) {} }; int V, H[maxn + 5], dis[maxn + 5], PreV[
阅读全文
摘要:问题 E: Plug It In! 题目描述 Adam just moved into his new apartment and simply placed everything into it at random. This means in particular that he did not
阅读全文
摘要:链式前向星与vector的两种邻接表建图 vector建图简单直观,加边灵活,但占用内存大。 链式前向星建图比较容易操作。 链式前向星 vector
阅读全文
摘要:int linker[N*2]; bool used[N*2]; vectormp[N]; bool dfs(int u) { int len=mp[u].size(); for(int i=0;i<len;i++) { int v=mp[u][i]; if(!used[v]) { used[v]=t...
阅读全文

浙公网安备 33010602011771号