代码:
IDA* 搜索与回溯
#include<bits/stdc++.h>
#define LL long long
using namespace std;
const int maxn = 11;
int n, m;
bool exi[maxn][maxn];
bool vis[4][maxn * 2];
bool occupy[maxn][maxn];
bool check() {
for(int i = 0; i < n; i++) {
for(int j = 0; j < m; j++) {
if(!exi[i][j]) continue;
if(!vis[0][i] && !vis[1][j] && !vis[2