AcWing 1113. 红与黑
BFS 计算数量,不是难题
#include<bits/stdc++.h>
using namespace std;
const int N = 25;
#define x first
#define y second
typedef pair<int, int>PII;
char g[N][N];
bool st[N][N];
int w, h;
int a, b;
queue<PII>q;
int dx[4] = {
1, -1
AcWing 1113. 红与黑
BFS 计算数量,不是难题
#include<bits/stdc++.h>
using namespace std;
const int N = 25;
#define x first
#define y second
typedef pair<int, int>PII;
char g[N][N];
bool st[N][N];
int w, h;
int a, b;
queue<PII>q;
int dx[4] = {
1, -1