上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 73 下一页
该文被密码保护。 阅读全文
posted @ 2018-09-26 09:12 Zinn 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4883 首先,注意到每个点可横可竖,但花费一样; 所以考虑行列的交集,那么这个条件可以转化为行点和列点之间的边,边权就是花费; 如果行和列都按原图交点连了边,那么问题就转化成在有向图中,每个点( 阅读全文
posted @ 2018-09-25 19:23 Zinn 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.luogu.org/problemnew/show/P1979 真是一道好题... 首先考虑暴力做法,应该是设 f[i][j][x][y] 记录指定棋子和空格的位置,然后 bfs 转移; 然后发现,这些状态中有很多无用的,换句话说,就是仅当空格在指定棋子旁边时才有用,能 阅读全文
posted @ 2018-09-25 17:27 Zinn 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1443 首先要得到一个最短路树; 注意边权和最小,因为在最短路中,每个点的 dis 都是固定的,所以边权和最小... 边权和会不同是因为,虽然 dis 固定,但由于组成 阅读全文
posted @ 2018-09-25 14:54 Zinn 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2067 问题1:贪心考虑,应该是每个点的儿子尽量两两配对,如果剩一个就和自己合并向上,所以 ans = 1 + ∑(1<= i <= n ) (deg[i] - 1)/2 问题2:二分最长线段的 阅读全文
posted @ 2018-09-22 17:33 Zinn 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.luogu.org/problemnew/show/P1084 5个月前曾经写过一次,某个上学日的深夜,精疲力竭后只有区区10分,从此没管... #include<iostream> #include<cstdio> #include<cstring> #include 阅读全文
posted @ 2018-09-22 15:37 Zinn 阅读(213) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-09-22 08:44 Zinn 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 题目:http://codeforces.com/contest/600/problem/E 看博客:https://blog.csdn.net/blue_kid/article/details/82192641 https://blog.csdn.net/clove_unique/article/ 阅读全文
posted @ 2018-09-21 22:06 Zinn 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目:http://codeforces.com/problemset/problem/1042/A 代码如下: 阅读全文
posted @ 2018-09-21 15:42 Zinn 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.luogu.org/problemnew/show/P1314 显然就是二分那个标准; 当然不能每个区间从头到尾算答案,所以要先算出每个位置被算了几次; 不知为何自己第一想法是把符合要求的位置插入树状数组再遍历区间得到该区间内的个数然后在其左右端点差分最后遍历位置时一边 阅读全文
posted @ 2018-09-21 15:29 Zinn 阅读(147) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 73 下一页