上一页 1 2 3 4 5 6 7 8 9 ··· 35 下一页
摘要: https://www.luogu.com.cn/problem/P3957 https://class.51nod.com/Html/Textbook/ChapterIndex.html#textbookId=126&chapterId=337 显然,但是维护滑动窗口有技巧,不能每次插入一个值,因 阅读全文
posted @ 2024-07-23 21:19 wscqwq 阅读(50) 评论(0) 推荐(0)
摘要: https://class.51nod.com/Html/Textbook/Problem.html#problemId=3972&textbookChapterId=723 https://class.51nod.com/Html/Textbook/ChapterIndex.html#textbo 阅读全文
posted @ 2024-07-23 16:00 wscqwq 阅读(75) 评论(0) 推荐(0)
摘要: DP很多情况下,至少有一维表示前xxx.(或者是最后的是xxx) 只要是小,少的都可以设计到状态中。 状态设计不能出现反悔,或者可以巧妙解决。 状态里可能需要额外记录一维表示最值的位置。 有一类DP,需要枚举最后一段的情况,例子 转移时,仅考虑最后的选择。 DP的一些定义(本质回归) 阅读全文
posted @ 2024-07-23 08:42 wscqwq 阅读(12) 评论(0) 推荐(0)
摘要: https://class.51nod.com/Html/Textbook/ChapterIndex.html#textbookId=126&chapterId=336 如果我们考虑 \(f[i][j]\) 表示假设只有区间 \([i,j]\),经过这个区间的人购买的最大值,发现转移时有些人会反悔, 阅读全文
posted @ 2024-07-23 08:36 wscqwq 阅读(36) 评论(0) 推荐(0)
摘要: https://class.51nod.com/Html/Textbook/ChapterIndex.html#textbookId=126&chapterId=336 https://class.51nod.com/Html/Challenge/Problem.html#problemId=175 阅读全文
posted @ 2024-07-22 16:32 wscqwq 阅读(12) 评论(0) 推荐(0)
摘要: https://class.51nod.com/Html/Textbook/ChapterIndex.html#textbookId=126&chapterId=336 https://class.51nod.com/Html/Challenge/Problem.Html#problemId=152 阅读全文
posted @ 2024-07-22 16:09 wscqwq 阅读(38) 评论(0) 推荐(0)
摘要: https://class.51nod.com/Html/Textbook/ChapterIndex.html#chapterId=335&textbookId=126 https://class.51nod.com/Html/Challenge/Problem.Html#problemId=159 阅读全文
posted @ 2024-07-21 22:04 wscqwq 阅读(62) 评论(0) 推荐(0)
摘要: 对于两个操作,一个复杂度是 \(O(k)\),而另一个是 \(O(n/k)\) 时,考虑按照 \(\sqrt n\) 分别处理。 有限背包计数问题 本题就是观察到 \(i*i\) 与 \(n\) 的大小关系。 阅读全文
posted @ 2024-07-21 22:01 wscqwq 阅读(10) 评论(0) 推荐(0)
摘要: 期望题分两类: 真正求期望,利用期望的线性性拆分答案DP 只是除以一个总数,求的实际上是分子。 阅读全文
posted @ 2024-07-19 08:26 wscqwq 阅读(14) 评论(0) 推荐(0)
摘要: 往往在区间操作会超时或者这种情况下不方便求出答案时使用。 对于 \([l,r]\) 的操作,可以变为 \(l,r+1\) 的操作。 注意这个技巧不支持中途询问,如需要则需结合树状数组或者线段树使用。 对于路径 \(u,v\),差分考虑对 \(u,v,lca(u,v),fa(lca(u,v))\) 中 阅读全文
posted @ 2024-07-13 13:00 wscqwq 阅读(7) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 35 下一页