随笔分类 - BFS
摘要:View Code 1 /* 2 简单的 BFS 相当于三维迷宫 3 4 */ 5 #include<iostream> 6 #include<cstdio> 7 #include<cstring> 8 #include<queue> 9 using namespace std; 10 11 const int size = 55; 12 13 int map[size][size][size]; 14 struct node 15 { 16 int x,y,z; 17 int step; 18 }sta[size*size*size]; 19 
        阅读全文
                
摘要:View Code 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<queue> 5 using namespace std; 6 7 struct node 8 { 9 int x,y; 10 }pace[1000]; 11 queue <node> q; 12 bool flag[21][21];//标记各个点是否走过 13 char map[21][100];//迷宫 14 int num[6];//各个门的总钥匙数 15 int ha
        阅读全文
                
                    
                
浙公网安备 33010602011771号