摘要: Try and Cry 我们肯定是尽可能的让前 \((n - 1)\) 个多拿,但是有可能这个有一些一样的,所以向上取整即可 #include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e6 + 阅读全文
posted @ 2024-10-02 21:07 libohan0518 阅读(1) 评论(0) 推荐(0) 编辑
摘要: bwtree 我们可以设 \(dp_{i, 0/1}\) 表示当前考虑至哪个点,这个节点的子树内选了几个叶子节点 #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5, INF = 1e9; int n, a[N], 阅读全文
posted @ 2024-10-02 19:51 libohan0518 阅读(3) 评论(2) 推荐(0) 编辑