AcWing 372. 棋盘覆盖
匈牙利算法(渣男算法):将所有格子看做点,格子之间连一条边,对这张图进行二分匹配,找最大匹配点对数
#include<bits/stdc++.h>
using namespace std;
#define x first
#define y second
typedef pair<int, int>PII;
const int N = 105;
bool g[N][N]; //记录这条边能不能用
int n, m;
PII pei[N][N]; //记录这个点所匹配的点是什么
int dx[4] = {
-1, 0