1 2 3 4
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 20 下一页
摘要: 传送门:https://ac.nowcoder.com/acm/problem/52805 我佛了,还能跑边图啊!!! 跑边图不能用vector啦啦啦啦啦 具体也不难,就直接上代码了 #include<cstdio> #include<queue> #include<iostream> #inclu 阅读全文
posted @ 2019-12-28 10:41 Lesning 阅读(129) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/964/B 整了个例题 一、欧拉路(能把边只走一次全走完,图还得连通) 1.无向图 (1)度数全是偶数 (2)有两个奇数度数节点(图都有偶数个奇度数节点,或者没有奇数度数节点)。 2.有向图 (1)每个点出度和入度一样 (2)出 阅读全文
posted @ 2019-12-26 19:29 Lesning 阅读(254) 评论(0) 推荐(1) 编辑
摘要: 传送门: https://ac.nowcoder.com/acm/contest/3274/B 牛客练习赛题,真就特判猜结论呗 // 他没说有好几个连通块啊 1 有环(所有点度数为2),极限就是n(连通块的定点数) 2 有链子,或者单点(度数不可能大于2,) 3 特判四个顶点的菊花图。。。。输出3 阅读全文
posted @ 2019-12-24 14:53 Lesning 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 参考来自这里: https://blog.csdn.net/qq_41286356/article/details/94554729 题目在这里 https://ac.nowcoder.com/acm/contest/375/C 这题真的好,算是排列组合+树形DP的结合 吧 这题换个问法就是 : 给 阅读全文
posted @ 2019-12-16 15:23 Lesning 阅读(769) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problemnew/solution/P4208 看这里的题解就够了其实 #include<iostream> #include<cstdio> #include<cstring> #include<vector> #include<algorit 阅读全文
posted @ 2019-12-11 13:52 Lesning 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 数据范围,n <= 50 具体看代码吧,倍增其实就是动态规划(目前我见过的来说) #include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<vector> using namespace st 阅读全文
posted @ 2019-12-09 21:50 Lesning 阅读(113) 评论(0) 推荐(0) 编辑
摘要: LCA+最小生成树是错的 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<vector> #define maxn 310 using namespace std; const lo 阅读全文
posted @ 2019-12-06 22:13 Lesning 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 问题本质是从左上角到右下角的两条不相交路劲,权值最大 1--动态规划(二进程动态规划) 或者 网格图费用流 确定好转移状态吧 #include<iostream> #include<cstring> #include<algorithm> #include<cstdio> #define maxn 阅读全文
posted @ 2019-12-05 12:29 Lesning 阅读(160) 评论(0) 推荐(0) 编辑
摘要: dp可真难呀 #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> using namespace std; int map[220][220]; int list[1100]; int dp[1100][ 阅读全文
posted @ 2019-12-04 20:35 Lesning 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 学到了学到了,逆元求组合数还有贼神仙的计数DP 太强了! 难受啊 阅读全文
posted @ 2019-12-03 21:02 Lesning 阅读(116) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 20 下一页