08 2018 档案
摘要:只是为了贴上自己的朱刘算法模板 include using namespace std; const int N=102; int b[N],mark[N],color[N],pre[N],ne; double low[N],in[N]; struct edges{int u,v;double w;
阅读全文
摘要:"朱刘算法" 差分?。。。(粘的别人代码) 考虑存在环,则该环中必定去一条边,且往外扩展一条边,那先假设环上所有边都选,则实际选择+w[v出] w[v环上入] include include using namespace std; const int inf=0x7fffffff; int n,m
阅读全文
摘要:枚举子树的形态:dp[i][j]=min(dp[i][j],dp[i][k]+dp[i][l])dp[i][j]=min(dp[i][j],dp[i][k]+dp[i][l]),其中kk和ll是对j的一个划分 按照边进行松弛:dp[i][j]=min(dp[i][j],dp[i′][j]+w[i][
阅读全文
摘要:``` include using namespace std; const int maxn=150002; int n,m,s[maxn],fa[maxn],c[2][maxn],rev[maxn],f[maxn],F[maxn],v[maxn],V[maxn]; inline void rea
阅读全文

浙公网安备 33010602011771号