上一页 1 2 3 4 5 6 7 8 9 10 ··· 62 下一页
摘要: BZOJ1458: 士兵占领 https://lydsy.com/JudgeOnline/problem.php?id=1458 分析: 先强制全都选上,然后求最多能删去几个。 然后就和正常的二分图匹配一样了。 代码: cpp include include include include incl 阅读全文
posted @ 2019-01-01 20:32 fcwww 阅读(104) 评论(0) 推荐(0) 编辑
摘要: BZOJ2597: [Wc2007]剪刀石头布 https://lydsy.com/JudgeOnline/problem.php?id=2597 分析: 好题。 先是补集转化,求最少的非剪刀石头布情况。 我们枚举那个赢了两次的人,可知总数就是$\sum\limits _ {i=1}^{n}\bin 阅读全文
posted @ 2019-01-01 20:24 fcwww 阅读(179) 评论(0) 推荐(0) 编辑
摘要: BZOJ3413: 匹配 https://lydsy.com/JudgeOnline/problem.php?id=3413 分析: 这题很好啊。 首先正着做比较麻烦,考虑转换一下。 我们不求$S$中每个长度等于$m$的匹配长度而是求$T$中每个前缀会匹配多少次。 这样就非常简单了,先跑一遍正常的匹 阅读全文
posted @ 2019-01-01 20:21 fcwww 阅读(240) 评论(0) 推荐(0) 编辑
摘要: BZOJ5084: hashit https://lydsy.com/JudgeOnline/problem.php?id=5084 分析: 对$trie$建立广义后缀自动机,由于是$trie$,不会有多余结点(lenx==lenfa) 令后缀自动机结点权值为$len_x len _ {fa_x}$ 阅读全文
posted @ 2019-01-01 20:18 fcwww 阅读(310) 评论(0) 推荐(0) 编辑
摘要: BZOJ2281: [Sdoi2011]黑白棋 https://lydsy.com/JudgeOnline/problem.php?id=2281 分析: $nimk$结论,先手必败当且仅当对于每一位有1的石子堆数模(d+1)都等于0。 那么把白棋到黑旗这段看成石子就可以直接用这个结论。 设$f[i 阅读全文
posted @ 2019-01-01 20:14 fcwww 阅读(164) 评论(0) 推荐(0) 编辑
摘要: BZOJ4808: 马 https://lydsy.com/JudgeOnline/problem.php?id=4808 分析: 黑白染色,求二分图最大匹配即可。 代码: cpp include include include include include include include usi 阅读全文
posted @ 2019-01-01 19:37 fcwww 阅读(150) 评论(0) 推荐(0) 编辑
摘要: BZOJ3208: 花神的秒题计划Ⅰ https://lydsy.com/JudgeOnline/problem.php?id=3208 分析: 暴力模拟,每次询问记忆化搜索。 代码: cpp include include include include include include inclu 阅读全文
posted @ 2019-01-01 19:36 fcwww 阅读(159) 评论(0) 推荐(0) 编辑
摘要: BZOJ3714: [PA2014]Kuglarz https://lydsy.com/JudgeOnline/problem.php?id=3714 分析: 询问$l\sim r$转化成$l 1$和$r$。 新加一个$0$,把询问看成连边就是要求一棵最小生成树。 prim即可 代码: cpp in 阅读全文
posted @ 2019-01-01 19:35 fcwww 阅读(168) 评论(0) 推荐(0) 编辑
摘要: BZOJ2102: [Usaco2010 Dec]The Trough Game https://lydsy.com/JudgeOnline/problem.php?id=2102 分析: 暴力枚举验证答案。 代码: 阅读全文
posted @ 2019-01-01 19:32 fcwww 阅读(119) 评论(0) 推荐(0) 编辑
摘要: BZOJ2697: 特技飞行 https://lydsy.com/JudgeOnline/problem.php?id=2697 分析: 每个特技选两个就够了。 贪心地选最大的放在最外面即可。 代码: cpp include include include include include inclu 阅读全文
posted @ 2019-01-01 19:31 fcwww 阅读(101) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 62 下一页