1 2 3 4
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页
摘要: 妹想到会是二分图匹配问题 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 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题链接 https://nanti.jisuanke.com/t/39277 好久不见我又回来了,这题要考虑他在问啥。这题要找子路径包含 异或和为0的路径 的路径的数量,而且有些许重复,枚举所有异或和为0 的路径,把他们的所有父路径列出来。 题解 如果x p在一条链子上,那就(siz[p])*( n 阅读全文
posted @ 2020-07-07 17:29 Lesning 阅读(175) 评论(0) 推荐(0) 编辑
摘要: https://codeforc.es/contest/1364/problem/D 看错题了,要求小于等于k的环或者(k+1)/2个独立集 找环dfs树就行了,独立集不知道定理,就盲找了,前十几个数字总有在最大独立集中参与的吧...所以就和1相连的所有点都猜一猜。。。。 #include<iost 阅读全文
posted @ 2020-06-17 15:20 Lesning 阅读(164) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/5795/B 提取一个公式既可 具体看代码 #include<iostream> #include<algorithm> using namespace std; typedef long long ll; const int 阅读全文
posted @ 2020-06-03 15:26 Lesning 阅读(268) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/5902/C 感谢LDK大神提供的最后解法 一个点z 到另一个点集合S的最长路为 ans 集合S中的最远点对x,y ans = max(ans,dis(x,z),dis(y,z)); 就是这样了 #include<cstring 阅读全文
posted @ 2020-06-02 20:53 Lesning 阅读(193) 评论(0) 推荐(0) 编辑
摘要: “科林明伦杯”哈尔滨理工大学第十届程序设计竞赛(同步赛) 换根来一波 https://ac.nowcoder.com/acm/contest/5758/A #include<iostream> #include<algorithm> #include<cstring> using namespace 阅读全文
posted @ 2020-05-31 17:15 Lesning 阅读(184) 评论(0) 推荐(0) 编辑
摘要: https://codeforc.es/contest/1359/problem/D 参考了一位大佬 https://www.cnblogs.com/stelayuri/p/12986700.html 看完题解我是震惊的。 枚举最大值,如果前面区间sum小于0,就直接扔掉(sum = 0),因为留下 阅读全文
posted @ 2020-05-29 17:34 Lesning 阅读(141) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/5600/J #include<iostream> using namespace std; typedef long long ll; const ll mod = 1e9+7; const int maxn = 2e5+11 阅读全文
posted @ 2020-05-20 18:19 Lesning 阅读(684) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/5556/A 代码今天晚上补完 #include<iostream> #include<cstring> #include<algorithm> #include<queue> #include<vector> using na 阅读全文
posted @ 2020-05-08 18:38 Lesning 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6035一棵n个结点的树,每个结点都有颜色,定义两点之间的路径长度为路径上出现的不同颜色数目,求树上所有路径的长度和。 https://blog.csdn.net/Bahuia/article/detail 阅读全文
posted @ 2020-05-06 21:38 Lesning 阅读(118) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页