随笔分类 - dfs
摘要:https://www.acwing.com/problem/content/description/4275/ 优质题解:https://www.acwing.com/solution/content/89003/ #include <iostream> #include <vector> #in
阅读全文
摘要:https://www.acwing.com/problem/content/1487/ 并查集维护连通块的写法 #include <iostream> #include <cstring> using namespace std; const int N = 1010, M = 500010; i
阅读全文
摘要:https://www.acwing.com/problem/content/description/1595/ dp解法 #include <iostream> #include <cstring> using namespace std; const int N = 410; int n, k,
阅读全文
摘要:https://www.acwing.com/problem/content/description/1497/ 思路: 一般这种题型的dijk,我们都可以在dijk中判断出来几个关键字,但这题却不行,因为我们无法确定在哪种情况下更好。所以我们先用一遍dijk来剪枝,找出所有到终点的最短路,然后用d
阅读全文

浙公网安备 33010602011771号