摘要:
残量网络: 由 剩余容量边和反向平衡流量 的边构成 dinic算法(省去了建图与s,t) 复杂度 O(n^2 *m) const int N =1e6+4, M =5*N ; const int inf =1e15+7; int all=1,hd[N],go[M],w[M],nxt[M]; int 阅读全文
摘要:
找字符串的最短循环节 1. kmp #include <bits/stdc++.h> using namespace std ; const int N=1e6+1; char a[N]; int n,p[N]; void init(){ int i,j=0; for(i=1;i<n;i++){ w 阅读全文