摘要: [JSOI2011] 柠檬 题解 决策单调性+单调栈+二分 学习自:皎月半洒花 十分强大的做法 Statement 给定长为 $n\le 10^5$ 的序列 $a_n\le 10^4$ ,定义一段区间的价值为 $\max {a_i\times (cnt_{r,a[i]}-cnt_{l-1,a[i]} 阅读全文
posted @ 2022-05-19 20:07 _Famiglistimo 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 最大值矩阵快速幂+倍增 Statement 给定一张 \(n\le 50\) 个点 \(m\le 501\) 条边的有向图,边权 \(w\le 5\),点有点权 \(c_i\le 52501\) 现在想从 \(1\) 出发,经过恰好 \(T\) 时间(中途不停留),经过一条边消耗边权 \(w\) 时 阅读全文
posted @ 2022-05-19 13:36 _Famiglistimo 阅读(59) 评论(0) 推荐(0) 编辑