Life Winner Bo Problem Description Bo is a "Life Winner".He likes playing chessboard games with his girlfriend G. The size of the chessboard is N×M.The top left corner is numbered(1,1) and the lower right corner is numberd (N,M). For each game
题目大意:给定n个数字以及每个数字的个数和权值,将满足条件的数字配对,使得总代价不小于0,且配对最多 最大费用最大流拆点,对于每个点,连一条由S到该点的边,容量为b,花费为0,再连一条到T的边 对于每个合法的配对,连一条容量无穷,费用为ci*cj的边 跑最大费用最大流即可 #include<bits/stdc++.h> using namespace std; #define inf (1ll<<50) #define ll long long struct edge{ int t