A - Jelly Solution 非常裸的三维bfs。 仅仅只是从经典的四连通变成了六连通然后跑个最短路就可以了。 一开始想用dfs搞,然后发现可能走的不是最短路。于是乖乖地去写bfs去了。 时间复杂度 Code #include<bits/stdc++.h> using namespace std; char a[101][101][101]; int dis[101][101][101]; const int fx[6][3] = {{-1, 0, 0}, {1, 0, 0}, {0, -1, 0}, {0, 1, 0}, {0, 0, -1}, {0, 0, 1}}; i...