上一页 1 2 3 4 5 6 7 8 ··· 62 下一页
摘要: BZOJ5304: [Haoi2018]字串覆盖 https://lydsy.com/JudgeOnline/problem.php?id=5304 分析: 设$L=r l+1$。 建出$sam$,倍增+线段树合并求出每个询问对应原串的$right$集合。 可以知道 如果$L 50$,则每次在线段树 阅读全文
posted @ 2019-01-06 20:08 fcwww 阅读(482) 评论(0) 推荐(0) 编辑
摘要: BZOJ5297: [Cqoi2018]社交网络 https://lydsy.com/JudgeOnline/problem.php?id=5297 分析: 求外向生成树个数。 矩阵树定理模板题。 代码: cpp include include include include include usi 阅读全文
posted @ 2019-01-06 19:57 fcwww 阅读(178) 评论(0) 推荐(0) 编辑
摘要: BZOJ5299: [Cqoi2018]解锁屏幕 https://lydsy.com/JudgeOnline/problem.php?id=5299 分析: 傻逼状压,$O(n^22^n)$跑的飞快。 代码: cpp include include include include using nam 阅读全文
posted @ 2019-01-06 19:56 fcwww 阅读(207) 评论(0) 推荐(0) 编辑
摘要: BZOJ5334: [Tjoi2018]数学计算 https://lydsy.com/JudgeOnline/problem.php?id=5334 分析: 线段树按时间分治即可。 代码: cpp include include include include using namespace std 阅读全文
posted @ 2019-01-06 19:55 fcwww 阅读(157) 评论(0) 推荐(0) 编辑
摘要: BZOJ5335: [TJOI2018]智力竞赛 https://lydsy.com/JudgeOnline/problem.php?id=5335 分析: 题意有两点需要注意: 1. 回答过的题目还能再回答一次 2. 图是个有向无环图(这怎么从题意中看出来?) 那么就好做了,二分答案之后转化成最小 阅读全文
posted @ 2019-01-06 19:54 fcwww 阅读(110) 评论(0) 推荐(0) 编辑
摘要: BZOJ5336: [TJOI2018]party https://lydsy.com/JudgeOnline/problem.php?id=5336 分析: 好题。 正常的思路是设$f[i][j][0/1/2]$表示前$i$个位置,与奖章串的$lcs$状态为$j$,匹配到$NOI$的第几位,然后转 阅读全文
posted @ 2019-01-06 18:49 fcwww 阅读(216) 评论(0) 推荐(0) 编辑
摘要: BZOJ5337: [TJOI2018]str https://lydsy.com/JudgeOnline/problem.php?id=5337 分析: 这题数据范围实在不明确,我以为总串长是$10^7$级别的,一直在想一个和总串长相关的线性做法...然后膜了题解。 这玩意,设$f[i][j]$表 阅读全文
posted @ 2019-01-06 18:44 fcwww 阅读(183) 评论(0) 推荐(0) 编辑
摘要: BZOJ5339: [TJOI2018]教科书般的亵渎 https://lydsy.com/JudgeOnline/problem.php?id=5339 分析: 难点在于模拟。 除去模拟的部分,我们需要计算$\sum\limits_{i=1}^ni^k$。 那这显然是关于$n$的一个$k+2$次多 阅读全文
posted @ 2019-01-06 18:38 fcwww 阅读(218) 评论(0) 推荐(0) 编辑
摘要: BZOJ5206: [Jsoi2017]原力 https://lydsy.com/JudgeOnline/problem.php?id=5206 分析: 比较厉害的三元环问题。 设立阈值,当点的度数大于根号时,考虑直接枚举三个点算答案。 否则,只需要考虑存在一个点度数小于等于根号的情况,枚举这个点, 阅读全文
posted @ 2019-01-06 18:32 fcwww 阅读(277) 评论(0) 推荐(0) 编辑
摘要: BZOJ4347: [POI2016]Nim z utrudnieniem https://lydsy.com/JudgeOnline/problem.php?id=4347 分析: 设$f[i][j][k]$表示前$i$堆石子选出$nd+k$堆使得异或和为$j$的方案数。 那么这个直接转移是$O( 阅读全文
posted @ 2019-01-06 18:29 fcwww 阅读(120) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 62 下一页