白书(二)-2.1穷尽搜索(练习题)(自我总结)
A - Red and Black
#include<iostream>
#include<cstring>
using namespace std;
int w,h;
char mp[21][21];
bool vis[21][21];
int startx,starty;
int dx[4]={0,0,1,-1};
int dy[4]={1-1,0,0};
int length;
void dfs(int x,int y)
{
if(x<1||x>h||.
原创
2021-11-02 20:21:35 ·
361 阅读 ·
0 评论