Test instructions: Three-bit space with N-layer for shortest circuit
Analysis: It is obvious that the wide search, but also wa many times:
1. Think only 3 layers
2. No special case is discussed: starting point and end point
3. The judgment end condition is placed! X inside
4. The coordinates of the input are changed into X, Y, z after the z,x,y in order to read the question carefully and found that the y,x,z changed the A.
In summary: Still did not seriously read the question understanding test instructions
I hope I won't make these mistakes.
#include <iostream> #include <cstring> #include <cstdio> #include <string> #include <queue >using namespace Std;int N;char a[20][20][20];int d[6][3]={{0,-1,0},{0,1,0},{0,0,-1},{0,0,1},{1,0,0},{-1,0,0}}; String B,c;int sz,sx,sy;int ez,ex,ey;int cnt;struct h{int z,x,y;int t;}; Queue
ZOJ 1438 Asteroids!--BFS (attention to detail)