摘要:
写炸,上网,不同KMP形态。 无力,照该,一换写法就过。 横批:我是垃圾 求$next$时$DP$出$num$,路径压缩防卡$n^2$ AC 全$WA$的原始代码 阅读全文
posted @ 2019-07-24 19:48
邱涵的秘密基地
阅读(135)
评论(0)
推荐(0)
该文被密码保护。 阅读全文
posted @ 2019-07-24 17:55
邱涵的秘密基地
阅读(50)
评论(0)
推荐(0)
摘要:
$next$应用,将原串视作最长前缀复制后的子串 阅读全文
posted @ 2019-07-24 16:23
邱涵的秘密基地
阅读(159)
评论(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
邱涵的秘密基地
阅读(127)
评论(0)
推荐(0)
摘要:
统计以节点$i$结尾的数量与经过的数量 阅读全文
posted @ 2019-07-24 15:03
邱涵的秘密基地
阅读(210)
评论(0)
推荐(0)
摘要:
复习$Trie$,忘了用$val[]$表示每个节点权值,用$vis[]$水过了 阅读全文
posted @ 2019-07-24 13:15
邱涵的秘密基地
阅读(136)
评论(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
邱涵的秘密基地
阅读(109)
评论(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
邱涵的秘密基地
阅读(128)
评论(0)
推荐(0)

浙公网安备 33010602011771号