摘要: 题目链接:https://www.luogu.com.cn/problem/P1725 阅读题面,容易想到 dp:定义 \(f_i\) 表示走到 \(i\) 时能获得的最大冰冻指数。初值 \(f_0=A_0\)。 转移:$$f_i=\max_{j=i-R}^{i-L}f_j+A_i$$ 直接转移是 阅读全文
posted @ 2026-08-22 16:47 Antony_pico 阅读(11) 评论(0) 推荐(0)
摘要: 题目链接:https://www.luogu.com.cn/problem/P6503 前置知识:单调栈 据说本题可以 dp,但是我不会。 将括号拆开,得到 \(\sum_{i=1}^{n}\sum_{j=i}^{n}\max_{i\leq k\leq j}a_k-\sum_{i=1}^{n}\su 阅读全文
posted @ 2026-08-22 16:47 Antony_pico 阅读(3) 评论(0) 推荐(0)