摘要: 裸题 阅读全文
posted @ 2019-07-24 21:36 邱涵的秘密基地 阅读(116) 评论(0) 推荐(0) 编辑
摘要: ~~未理解透,鬼知道怎么A的~~ 蒟蒻交了个乱猜贪心搞了10pts,一翻题解群佬乱舞,最后DP解决 $\exists i next[i] include include include include define R(a,b,c) for(register int a = (b); a = (c) 阅读全文
posted @ 2019-07-24 20:46 邱涵的秘密基地 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 写炸,上网,不同KMP形态。 无力,照该,一换写法就过。 横批:我是垃圾 求$next$时$DP$出$num$,路径压缩防卡$n^2$ AC 全$WA$的原始代码 阅读全文
posted @ 2019-07-24 19:48 邱涵的秘密基地 阅读(129) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-07-24 17:55 邱涵的秘密基地 阅读(49) 评论(0) 推荐(0) 编辑
摘要: $next$应用,将原串视作最长前缀复制后的子串 阅读全文
posted @ 2019-07-24 16:23 邱涵的秘密基地 阅读(155) 评论(0) 推荐(0) 编辑
摘要: $最小循环节$ $=$ $lenghth next[lenghth]$ cpp include include include include include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b) 阅读全文
posted @ 2019-07-24 15:49 邱涵的秘密基地 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 统计以节点$i$结尾的数量与经过的数量 阅读全文
posted @ 2019-07-24 15:03 邱涵的秘密基地 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 复习$Trie$,忘了用$val[]$表示每个节点权值,用$vis[]$水过了 阅读全文
posted @ 2019-07-24 13:15 邱涵的秘密基地 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 复习字符串ing KMP模板 cpp include include include include include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b) ((a) (b) ? (a) : (b)) 阅读全文
posted @ 2019-07-24 12:49 邱涵的秘密基地 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 树形DP,一脸蒙蔽。看了题解才发现它转移状态与方程真不愧神题! $f[x][y]$表示$x$的$y$层以下的所有点都已经覆盖完,还需要覆盖上面的$y$层的最小代价。 $g[x][y]$表示$x$子树中所有点都已经覆盖完,并且$x$还能向上覆盖$y$层的最小代价。 $g[u][j]=\min(g[u] 阅读全文
posted @ 2019-07-24 10:12 邱涵的秘密基地 阅读(121) 评论(0) 推荐(0) 编辑