上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 62 下一页
摘要: E86 换根DP CF1324F Maximum White Subtree_哔哩哔哩_bilibili CF1324F Maximum White Subtree - 洛谷 // 换根DP O(n) #include <bits/stdc++.h> using namespace std; con 阅读全文
posted @ 2024-12-03 20:39 董晓 阅读(311) 评论(0) 推荐(1)
摘要: E85 换根DP P2986 [USACO10MAR] Great Cow Gathering G_哔哩哔哩_bilibili P2986 [USACO10MAR] Great Cow Gathering G - 洛谷 // 换根DP O(n) #include<bits/stdc++.h> usi 阅读全文
posted @ 2024-11-30 21:09 董晓 阅读(328) 评论(0) 推荐(0)
摘要: E84【模板】换根DP P3478 [POI2008] STA-Station_哔哩哔哩_bilibili P3478 [POI 2008] STA-Station - 洛谷 // 换根DP O(n) #include<bits/stdc++.h> using namespace std; cons 阅读全文
posted @ 2024-11-30 16:16 董晓 阅读(470) 评论(0) 推荐(0)
摘要: E83 树上背包+二项式反演+排列组合 P6478 [NOI Online #2 提高组] 游戏_哔哩哔哩_bilibili P6478 [NOI Online #2 提高组] 游戏 - 洛谷 // 树上背包 O(n*m) #include<bits/stdc++.h> #define int lo 阅读全文
posted @ 2024-11-21 21:11 董晓 阅读(256) 评论(0) 推荐(0)
摘要: E82 树上背包 P4516 [JSOI2018] 潜入行动_哔哩哔哩_bilibili P4516 [JSOI2018] 潜入行动 - 洛谷 // 树上背包 O(n*k) #include<bits/stdc++.h> using namespace std; typedef long long 阅读全文
posted @ 2024-11-17 08:21 董晓 阅读(297) 评论(0) 推荐(0)
摘要: E81 树上背包 CF1830D Mex Tree_哔哩哔哩_bilibili CF1830D Mex Tree - 洛谷 // 树上背包 O(n*sqrt(n)) #include<bits/stdc++.h> using namespace std; int read(){ int d=0;ch 阅读全文
posted @ 2024-11-16 16:02 董晓 阅读(248) 评论(0) 推荐(0)
摘要: E80 树上背包 P3354 [IOI2005] Riv 河流_哔哩哔哩_bilibili P3354 [IOI 2005] Riv 河流 - 洛谷 // 树上背包 O(n*n*m*m) #include<bits/stdc++.h> #define N 105 using namespace st 阅读全文
posted @ 2024-11-08 16:35 董晓 阅读(309) 评论(0) 推荐(0)
摘要: E79 树上背包 P1270 “访问”美术馆_哔哩哔哩_bilibili P1270 “访问”美术馆 - 洛谷 // 树上背包 O(2000*6000) #include<bits/stdc++.h> using namespace std; const int N=6005; int head[N 阅读全文
posted @ 2024-11-06 19:11 董晓 阅读(370) 评论(0) 推荐(0)
摘要: E78 树上背包 P1273 有线电视网_哔哩哔哩_bilibili P1273 有线电视网 - 洛谷 // 树上背包 O(n*m) #include<bits/stdc++.h> using namespace std; int read(){ int x=0,f=1;char ch=getcha 阅读全文
posted @ 2024-11-05 22:02 董晓 阅读(330) 评论(0) 推荐(0)
摘要: E77 树上背包 P1272 重建道路_哔哩哔哩_bilibili P1272 重建道路 - 洛谷 // 树上背包 O(n*n) #include<bits/stdc++.h> #define N 155 using namespace std; int read(){ int d=0;char c 阅读全文
posted @ 2024-11-04 16:24 董晓 阅读(314) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 62 下一页