随笔分类 -  vjudge

P3959 [NOIP2017 提高组] 宝藏 --状态压缩dp,dfs
摘要:#include <bits/stdc++.h> #define dbg(x) std::cerr << #x << "=" << x << "\n" using i64 = long long; constexpr int N = 15; int n, m, lim, ans = 2e9, G[N 阅读全文
posted @ 2022-07-15 23:17 OopsOops 阅读(58) 评论(0) 推荐(0) 编辑
P2024食物链 - 种类并查集datastructure
摘要:#include <bits/stdc++.h> #define dbg(x) std::cerr << #x << "=" << x << "\n" using i64 = long long; constexpr int N = 100005; int fa[N * 3]; int find(i 阅读全文
posted @ 2022-07-15 12:15 OopsOops 阅读(21) 评论(0) 推荐(0) 编辑
City - 并查集路径压缩与按秩合并 datastructure
摘要:#include <bits/stdc++.h> using i64 = long long; #define dbg(x) std::cerr << #x << "=" << x << "\n" struct node{ int u,v,w; }; int fa[100005], rank[100 阅读全文
posted @ 2022-07-15 11:34 OopsOops 阅读(19) 评论(0) 推荐(0) 编辑

 
点击右上角即可分享
微信分享提示