随笔分类 - 7.6 字符串——哈希
摘要:题面 https://www.luogu.org/problem/P2704 题解 状态压缩$dp$的经典题了吧。 因为直接压压不动,所以我写的是$hash$+记忆化。
阅读全文
摘要:题面 https://www.luogu.org/problem/P4363 题解 很套路的$hash$状态$+dp$。 可知棋子形成的形状一定是一个连续的倒楼梯形(楼梯向右延伸的长度可以不连续,但一定单调) $hash$轮廓就行了。
阅读全文
摘要:题面 https://www.luogu.org/problem/P1173 题解 终于调出来了呢。 这道题和【NOI2015】小园丁和老司机一样,都是码量大的神仙题,不过写小园丁和老司机的时候,没有花太长时间调试,但是这题...真的是自闭了。 首先,答案肯定在$-1$,$0$,$1$,$2$之间。
阅读全文
摘要:题面 https://www.luogu.org/problem/P4503 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P3167 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P4036 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P2470 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P2601 题解 二维哈希(和二维前缀和类似) 右向量:$107$下向量:$233$ 才不会取名叫$wls$和$wym$ upd:突然想到,取$wls$和$wym$也挺好的,因为他们作为两个基向量,被我期待在任何一点永不相交。 讽刺的
阅读全文
摘要:题面 https://loj.ac/problem/6066 题解
阅读全文
摘要:题面 https://loj.ac/problem/2072 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P4324 题解
阅读全文
摘要:题面 https://www.luogu.org/problem/P3501 题解
阅读全文

浙公网安备 33010602011771号