Drying

CF1889C2 Doremy's Drying Plan (Hard Version)

Problem - C2 - Codeforces Doremy's Drying Plan (Hard Version) - 洛谷 很好的一道 \(dp\) 题,无论是 \(dp\) 状态还是优化都很思维 我们设 \(dp_{i,j}\) 表示考虑了前 \(i\) 个城市,第 \(i\) 个城市干 ......
Version Doremy Drying 1889C 1889

E1. Doremy's Drying Plan (Easy Version)

E1. Doremy's Drying Plan (Easy Version) The only differences between the two versions of this problem are the constraint on $k$, the time limit and th ......
Version Doremy Drying Plan Easy

Codeforces Round 906 (Div. 2) Doremy's Drying Plan E1.&E2

传送门 先考虑\(E1\) 只需要删除两条线使得不被覆盖的点数最多。 观察到点数只有\(200000\) 那么我们完全可以先将被至少\(3\)条线覆盖的点删掉。 考虑枚举一条线,枚举这条线覆盖的点寻找另外一条线覆盖这些点中的最大值,然后再找没覆盖这些点之外的线的最大值即可。 复杂度容易证明是线性的。 ......
Codeforces Doremy Drying Round Plan

《CF1889C2 Doremy's Drying Plan (Hard Version)》 解题报告

考场上不会做。 如果考虑删掉哪些区间实际上不太可做。正难则反,转化贡献,考虑哪些点可以有贡献。 显然一个点如果可能有贡献,那么当且仅当覆盖它的区间 \(\le K\) 个。 于是我们记一个状态 \(f_{i,j}\) 表示前 \(i\) 个点中, \(i\) 是最后一个贡献的点,已经删除了 \(j\ ......
Version 报告 Doremy Drying 1889C

CF1889C2 Doremy's Drying Plan (Hard Version) 题解

Description 有 \(n\) 个点和 \(m\) 条线段,你可以选择 \(k\) 条线段删除,最大化未被线段覆盖的点的数量,输出最大值,\(n, m \le 2 \times 10^5, k \le \min(m, 10)\) Solution 一道比较好玩的 dp 题。建议评级紫。 单独 ......
题解 Version Doremy Drying 1889C

CF1889C2. Doremy's Drying Plan (Hard Version)

容易想到 dp:设 \(dp_{i,p}\) 表示前 \(i\) 天,强制第 \(i\) 天 dry,并且一共消除了 \(p\) 个区间的答案。 转移时可以考虑枚举前面的决策 \(j\),此时有转移方程: \[dp_{i,p}=\max(dp_{j,p-w})+1 \]其中 \(w\) 为满足 \( ......
Version Doremy Drying 1889 Plan
共6篇  :1/1页 首页上一页1下一页尾页