随笔分类 - 算法-广搜(DFS)
摘要:https://www.luogu.com.cn/problem/P1443 #include <stdio.h> #include <stdlib.h> #include <math.h> using namespace std; int s[400][400]; typedef struct q
阅读全文
摘要:题目: https://www.luogu.com.cn/problem/P1162 #include <stdio.h> #include <stdlib.h> using namespace std; int board[30][30]; int vis[30][30]; typedef str
阅读全文
摘要:题目: https://www.luogu.com.cn/problem/P1135 #include <stdio.h> #include <math.h> int q[201]; //用队列维护,经常的事 int h, t; //tail ,hair int s[201]; //到i的距离 in
阅读全文