随笔分类 - 最短路
摘要:这道题记录状态的思想挺好的 假如棋子在(i,j): 那么它上面空格的编号为((i-1)*4+(j-1)*4+0) 那么它下面空格的编号为((i-1)*4+(j-1)*4+1) 那么它左面空格的编号为((i-1)*4+(j-1)*4+2) 那么它右面空格的编号为((i-1)*4+(j-1)*4+3)
阅读全文
摘要:#include<iostream> #include<cstring> #include<queue> #include<cstdio> #define INF 0x3f3f3f3f using namespace std; int N=0,last[1000001],dis[1000001],v
阅读全文
摘要:指路洛谷 #include<iostream> #include<sstream> #include<cstring> #include<cstdio> #include<queue> using namespace std; const long long INF=2147483647; int
阅读全文

浙公网安备 33010602011771号