上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 25 下一页
摘要: 写炸,上网,不同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 邱涵的秘密基地 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 统计以节点$i$结尾的数量与经过的数量 阅读全文
posted @ 2019-07-24 15:03 邱涵的秘密基地 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 复习$Trie$,忘了用$val[]$表示每个节点权值,用$vis[]$水过了 阅读全文
posted @ 2019-07-24 13:15 邱涵的秘密基地 阅读(131) 评论(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 邱涵的秘密基地 阅读(103) 评论(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) 编辑
摘要: 枚举末位状态 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)) define 阅读全文
posted @ 2019-07-23 21:56 邱涵的秘密基地 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 曾经放弃的坑,都是坑 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)) def 阅读全文
posted @ 2019-07-23 21:31 邱涵的秘密基地 阅读(106) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 25 下一页