摘要:
const int MAXN = 205;bool board[MAXN][MAXN];//存边 int color[MAXN];//用于染色法判断是否是二分图 int N,M;//N个点M条边 bool Judge(int x){ for(int i=1 ; i<=... 阅读全文
摘要:
There are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C kno... 阅读全文
摘要:
const int MAXN = ;const int INF = 0x3f3f3f3f; struct Edge{ int flow,to,rev; Edge(){} Edge(int a,int b,int c):to(a),flow(b),rev(c){}}; ... 阅读全文
摘要:
const int INF = 0x3f3f3f3f;const int MAXN = ; struct Edge{ int value,flow,to,rev; Edge(){} Edge(int a,int b,int c,int d):to(a),value(... 阅读全文
摘要:
(1)二分图的最大匹配匈牙利算法(可以用最大流做,但一般匈牙利要快不少)。(2)二分图的最小点覆盖二分图的最小点覆盖 = 二分图的最大匹配(3)二分图的最少边覆盖二分图的最少边覆盖 = 点数 - 二分图的最大匹配(4)二分图的最大独立集二分图的最大独立集 = 点数 -... 阅读全文
摘要:
Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starti... 阅读全文
摘要:
转载自:https://blog.csdn.net/jarjingx/article/details/8521690序言 最近花了一点心思研究2-sat模型,看了很多论文博客等等,也在POJ上做了一点题。其实这个东西也还挺好玩的,当然,前提是每道题你... 阅读全文
摘要:
Recently, the γ galaxies broke out Star Wars. Each planet is warring for resources. In the Star Wars, Planet X is under attack by othe... 阅读全文
摘要:
freopen("input.txt","r",stdin);freopen("output.txt","w",stdout); 阅读全文
摘要:
This story happened on the background of Star Trek.Spock, the deputy captain of Starship Enterprise, fell into Klingon’s trick and was... 阅读全文