思路:
我们浅推一波可以发现,每个格子看成一个点,向它能走到的点连边,然后就变成了最小覆盖问题
跑个匈牙利不成问题
c o d e code code
#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
const int dx[8] = {
1, 1, 2, 2, -1, -1, -2, -2 };
const int dy[8] = {
2, -2, 1, -1, 2, -2, 1, -1 };
int n, m, btot, wtot;
int a[