摘要: 题目链接:https://ac.nowcoder.com/acm/contest/10845/F 如图: #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1000010; cons 阅读全文
posted @ 2021-01-24 11:57 Tartarus_li 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://ac.nowcoder.com/acm/contest/10845/D 斯坦纳树:联通若干特殊点的最小生成树 该题中因为同种宝石间传送无需花费代价,所以把同种宝石的城市缩成一个特殊点,然后求斯坦纳树即可 斯坦纳树求解: 设 \(dp[i][S]\) 表示以 \(i\) 为根 阅读全文
posted @ 2021-01-24 11:55 Tartarus_li 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://ac.nowcoder.com/acm/contest/10845/E 线性基:https://oi.men.ci/linear-basis-notes/ 二分后转化成线性基求第 \(k\) 大 #include<bits/stdc++.h> using namespace 阅读全文
posted @ 2021-01-24 11:48 Tartarus_li 阅读(124) 评论(0) 推荐(0) 编辑