周测【二叉树bfs】
A. P1746 离开中山路完全预判啊我一开始就用的dfs没做出来#include<bits/stdc.h>
using namespace std;
const int MAXN 1005;
int mp[MAXN][MAXN];
bool vis[MAXN][MAXN];
int n;
int dx[] {-1, 1, 0, 0};
int dy[] {0, 0, -1, 1};
struct Node {int x, y, step;
};…
2026/8/12 18:54:18