
图论
Exception2017
OI总结
展开
-
CF1000E We Need More Bosses (tarjan + dfs)
E. We Need More Bossestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYour friend is developing a computer game. He has already ...原创 2018-11-03 11:11:44 · 206 阅读 · 0 评论 -
CF547D Mike and Fish 欧拉回路
原题:https://www.luogu.org/problemnew/show/CF547D题解:给你n个点染成红或蓝色,使每一行,列的b,r数量不超过1。考虑建图把横纵坐标连在一起这样就能保证行列有连通性。假设建完图正好是个欧拉回路,则入度等于出度,且所有的度数都是偶数,可以将入度染出b出度染成r,这样就能保证b,r,配对。但若有不是欧拉回路,就要想办法构造,将所有奇数点两两配对,构成...原创 2019-03-29 23:16:09 · 620 阅读 · 0 评论 -
【模板】网络最大流 dinic
原题:https://www.luogu.org/problemnew/show/P3376题解:s到t的最大流。dinic模板。#include<bits/stdc++.h>#define inf (1<<31)-1 using namespace std;const int N=10010;const int M=100010;struct E{in...原创 2019-04-06 23:28:27 · 114 阅读 · 0 评论