摘要:
区间DP 不多说了 和上面那个题一样 还是日常DFS写DP 不会循环 #include<bits/stdc++.h> #define fi first #define se second #define io std::ios::sync_with_stdio(false) using namesp 阅读全文
摘要:
题解: 欧拉回路板子题 DFS的板子 ,要点是当前弧优化(类似网络流),以及开个 边的vis数组 就可以了 #include<cstdio> #define N 100005 #define M 200005 using namespace std; int last[N], ecnt = 1, c 阅读全文
摘要:
我是不知道我当时咋想的。。。 不知道自己在想啥, 题解: 直接DFS找连通块的数量 N 然后答案是N-1 #include <bits/stdc++.h> using namespace std; int n,x[101],y[101],vis[101]; void dfs(int i) { vis 阅读全文