
广搜
文章平均质量分 61
chaoyueziji123
这个作者很懒,什么都没留下…
展开
-
模板,BFS
#include #include #include using namespace std; struct node { int x,y,step; }; char map[105][105]; int vis[105][105]; int to[4][2]= {1,0,-1,0,0,1,0,-1}; int n,m,sx,sy,ex,ey,ans; int check(in原创 2014-07-19 17:24:43 · 992 阅读 · 0 评论 -
迷宫问题 poj
#include #include #include #include #include using namespace std; struct Node { int x,y; }node[30]; int father[30],map[5][5],vis[5][5]; int xx[4]={1,-1,0,0}; int yy[4]={0,0,1,-1}; queueq; void p原创 2015-02-26 13:46:13 · 648 阅读 · 0 评论 -
Knight Moves
Description A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n square原创 2015-01-22 19:30:14 · 872 阅读 · 0 评论