1 2 3 4

07 2020 档案

摘要:本题和cf 888G是一样的 利用分治算法 #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; const int maxn = 2e5+11; typedef 阅读全文
posted @ 2020-07-31 18:13 Lesning 阅读(178) 评论(0) 推荐(0)
摘要:题解传送门,大佬说的非常好:https://www.luogu.com.cn/blog/xuxing/solution-at1999 对于一次删除一行的问题来说,可以优先画个网格图考虑左下点的变化方式,太强了! 阅读全文
posted @ 2020-07-22 20:40 Lesning 阅读(125) 评论(0) 推荐(0)
摘要:https://ac.nowcoder.com/acm/problem/20265 dp[a][b][c][d][e][llast]可以涂满1个块的颜色有a个,2个块的有b个。。。。。当前末尾是可以涂last个颜色的块涂的。 可以发现,如果用了一次b,b就会少一个颜色,a会增加一个颜色。原理就是这样 阅读全文
posted @ 2020-07-21 13:35 Lesning 阅读(278) 评论(0) 推荐(0)
摘要:传送门 https://ac.nowcoder.com/acm/contest/5669/H 我写在这里了https://blog.nowcoder.net/n/589d219b9636417b903d633f6c44d2c7 阅读全文
posted @ 2020-07-21 13:11 Lesning 阅读(98) 评论(0) 推荐(0)
摘要:https://ac.nowcoder.com/acm/contest/5667/G 题解其实有个前置知识,先整出一个O(n*m)的写法,很简单。但是需要优化。 利用bitset数1的个数计算答案,排好顺序。具体看神仙的代码吧,真的很强!我是看代码学会的 #include<iostream> #in 阅读全文
posted @ 2020-07-14 23:47 Lesning 阅读(246) 评论(0) 推荐(0)
摘要:https://ac.nowcoder.com/acm/problem/51265 割点的板子 #include<iostream> #include<cstring> #include<algorithm> #include<vector> #include<queue> using namesp 阅读全文
posted @ 2020-07-11 16:44 Lesning 阅读(150) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/justPassBy/p/5369930.html看这个就理解了,棒 阅读全文
posted @ 2020-07-11 00:50 Lesning 阅读(185) 评论(0) 推荐(0)
摘要:传送门 : https://ac.nowcoder.com/acm/contest/1063/C 棋子两两冲突,放最多的棋子。 把冲突的棋子之间建条边,建好后发现选择的是最大独立集。 图中不可能有奇环,是二分图。 二分图的 最大独立集 = 顶点总数 - 最小路径覆盖 = 顶点总数 - 最大匹配 然后 阅读全文
posted @ 2020-07-10 17:06 Lesning 阅读(326) 评论(0) 推荐(0)
摘要:传送门 : http://poj.org/problem?id=2226 这个题需要的知识 1 二分图的最大匹配(网络流,或者匈牙利) 2 二分图的最小顶点覆盖等于最大匹配 左边顶点是行编号,右边顶点是列编号,每个边是一个泥坑。顶点覆盖边,就是木板覆盖泥坑。 具体看代码吧,横着扫一遍竖着再扫一遍 # 阅读全文
posted @ 2020-07-09 18:03 Lesning 阅读(213) 评论(0) 推荐(0)
摘要:妹想到会是二分图匹配问题 https://www.luogu.com.cn/problem/P1129 图片选自https://www.luogu.com.cn/blog/sswcdak/solution-p1129,一目了然 #include<iostream> #include<cstring> 阅读全文
posted @ 2020-07-09 11:06 Lesning 阅读(153) 评论(0) 推荐(0)
摘要:题链接 https://nanti.jisuanke.com/t/39277 好久不见我又回来了,这题要考虑他在问啥。这题要找子路径包含 异或和为0的路径 的路径的数量,而且有些许重复,枚举所有异或和为0 的路径,把他们的所有父路径列出来。 题解 如果x p在一条链子上,那就(siz[p])*( n 阅读全文
posted @ 2020-07-07 17:29 Lesning 阅读(189) 评论(0) 推荐(0)