摘要: 题意 给原串 $n$ 长度串 $S$ , 一个 $m$ 长度的权值数组 $v$ , $k$ 个 $m$ 长度的询问串, 要求每个询问串找一个与原串的公共子串, 使得子串所在段的权值和 ( 询问串和权值数组一一对应 ) 最大 思路 SAM 将 $v$ 数组丢到线段树上跑区间子段最大值 (也可以用单调队 阅读全文
posted @ 2022-07-27 16:15 LacLic 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 题意 记 $F_{n,k}$ 表示串长 $n$ 且 "bit" 串恰好出现 $k$ 次的本质不同字串个数 现在给定 $n$ , 求 $F_{n,0},F_{n,1},\cdots,F_{n,k},$, 要求答案对 $998244353$ 取模, $n \leq 10^6$. 思路 FFT 记 $f_ 阅读全文
posted @ 2022-07-27 10:31 LacLic 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 4 种 cache 替换策略对比 RAND, FIFO, LRU, LFU 实验参考条件 参考的是我电脑上的 i7-10750H ,根据《Intel Core i7-10750H Processor 12M Cache up to 5.00 GHz 产品规范》显示,这款 CPU 的缓存容量大小为 1 阅读全文
posted @ 2022-04-06 09:50 LacLic 阅读(538) 评论(1) 推荐(1) 编辑
摘要: title: >- The 2021 ICPC Asia Shanghai Regional Programming Contest - B. Strange Permutations date: 2021-12-13 15:27:09 tags: [inclusion-exclusion, com 阅读全文
posted @ 2021-12-13 15:49 LacLic 阅读(638) 评论(0) 推荐(0) 编辑
摘要: title: Codeforces-Edu118(Div.2)F. Tree Coloring date: 2021-12-12 23:17:43 tags: [codeforces,div2,cpp,problem F,fft,divide and conquer,merge] 题意 给定一棵树, 阅读全文
posted @ 2021-12-12 23:27 LacLic 阅读(68) 评论(0) 推荐(0) 编辑
摘要: math / 数学 inclusion-exclusion / 容斥 个人认为莫比乌斯反演属于容斥内容,不再额外开标签 Integer Partition / 整数拆分 CCPC2021 Weihai - M. 810975 n场比赛,获胜m场,最多连胜k场 => 整数拆分+容斥 传送门 gcd a 阅读全文
posted @ 2021-11-25 20:44 LacLic 阅读(449) 评论(0) 推荐(0) 编辑
摘要: title: The 2021 CCPC Weihai Onsite - M. 810975 题解 date: 2021-11-25 19:04:21 tags: [inclusion-exclusion, combinatorics, math, FFT, team training] mathj 阅读全文
posted @ 2021-11-25 20:16 LacLic 阅读(680) 评论(4) 推荐(3) 编辑
摘要: title: The 2021 CCPC Guangzhou Onsite - K. Magus Night 题解 date: 2021-11-18 18:19:00 tags: [inclusion-exclusion, number theory, math, team training] ma 阅读全文
posted @ 2021-11-18 19:54 LacLic 阅读(750) 评论(5) 推荐(2) 编辑
摘要: title: 'codeforces-COMPFEST 13 Finals Online Mirror, cf-1575G. GCD Festival' date: 2021-11-15 17:04:50 tags: [math, number theory] mathjax: true 题意 给定 阅读全文
posted @ 2021-11-15 18:17 LacLic 阅读(109) 评论(4) 推荐(0) 编辑
摘要: title: luogu-P2257-YY's gcd date: 2021-11-15 15:38:10 tags: [math,number theory] mathjax: true 题意 直接看题面吧 luogu P2257 思路 莫比乌斯反演(虽然本质上是容斥,在这里推公式更好做,但有时候 阅读全文
posted @ 2021-11-15 17:00 LacLic 阅读(28) 评论(0) 推荐(0) 编辑