POJ3984 迷宫问题记录路径递归 bfs HDU1242 dfs Codeforces25D.Roads in Berland floyd优化 HDU1874畅通工程续 floyd/spfa/dj
#include#include#includeusingnamespacestd;typedeflonglongll;constintmaxn=2e5+5;lln,sx,sy,ex,ey;//0:先序1:镜像先序llmaze[5][5],vis[5][5];lldir[4][2]={{0,1},{0,-1},{1,0},{-1,0}};structnode{llx,y;//d};nodefath