这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
2020-2021:teams:intrepidsword:2020.07.24-2020.07.30_周报 [2020/07/31 17:19] chielo [jsh] |
2020-2021:teams:intrepidsword:2020.07.24-2020.07.30_周报 [2020/08/07 18:17] (当前版本) chielo 已恢复为旧版 (2020/07/31 17:46) |
||
---|---|---|---|
行 73: | 行 73: | ||
Atcoder M-SOLUTIONS Programming Contest 2020 problem E | Atcoder M-SOLUTIONS Programming Contest 2020 problem E | ||
- | https://atcoder.jp/ | + | https://img.atcoder.jp/m-solutions2020/editorial.pdf |
**Tags**:search | **Tags**:search | ||
- | **题意**:见链接 | + | **题意**:平面上若干个点 已在x轴,y轴建设道路。定义点权重为点上的人数和到任意一条道路的最小距离之积。问假设可以再增加k条平行于x或y轴的道路。求最小点权和。 |
- | **题解**:见链接 | + | **题解**: 一个简单的想法是暴力枚举在哪些点上建设道路 然后check。这样的复杂度是2^n * n^3的。其实预存一张表来记录每个点建设道路后的对其他点的更新,这样check的复杂度是n^2的。 |
+ | 实际上可以3^n去枚举所有可能的情况(无道路,平行x轴,平行y轴。这样是3^n * n的。 | ||
**Comment**:考虑清楚3^n,2^n * n^2 等复杂度和如何优化查询 | **Comment**:考虑清楚3^n,2^n * n^2 等复杂度和如何优化查询 |