上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 55 下一页
摘要: 示例代码: 阅读全文
posted @ 2020-05-18 01:36 quanjun 阅读(133) 评论(0) 推荐(0)
摘要: 题目链接: "https://www.luogu.com.cn/problem/P3388" 参考博客: "http://keyblog.cn/article 80.html" 实现代码如下: 阅读全文
posted @ 2020-05-18 01:35 quanjun 阅读(161) 评论(0) 推荐(0)
摘要: 题目链接: "https://www.luogu.com.cn/problem/P3376" 思路完全参照自 SYCstudio 的这篇博客: "https://www.cnblogs.com/SYCstudio/p/7260613.html" 实现代码(dinic实现): 阅读全文
posted @ 2020-05-17 22:20 quanjun 阅读(153) 评论(0) 推荐(0)
摘要: 题目链接: "https://www.luogu.com.cn/problem/P3887" 解题思路: 一开始给4组人从大到小排序然后放入4个队列,然后每次从队列中选出来人,用4个队列模拟即可。 实现代码如下: 阅读全文
posted @ 2020-05-15 15:22 quanjun 阅读(394) 评论(0) 推荐(0)
摘要: 题目链接: "http://poj.org/problem?id=2585" 示例代码: 阅读全文
posted @ 2020-05-10 14:05 quanjun 阅读(66) 评论(0) 推荐(0)
摘要: 题目链接: "https://www.luogu.com.cn/problem/P1218" 实现代码如下: 阅读全文
posted @ 2020-05-07 16:33 quanjun 阅读(197) 评论(0) 推荐(0)
摘要: 题目链接: "https://www.luogu.com.cn/problem/P1161" 解题思路: 因为只有一盏灯是开着的,说明除了这盏灯被操作过奇数次以外,别的灯都被操作过偶数次(偶数包括0)。 所以我们只需要对所有的数进行异或操作,异或和就是我们的答案。 实现代码如下: 阅读全文
posted @ 2020-05-06 12:29 quanjun 阅读(385) 评论(0) 推荐(0)
摘要: 题目链接: "https://www.luogu.com.cn/problem/P1330" 解题思路:DFS,判断每一个连通块是不是二分图。 实现代码如下: 阅读全文
posted @ 2020-05-01 21:34 quanjun 阅读(105) 评论(0) 推荐(0)
摘要: 题目链接: "https://www.luogu.com.cn/problem/P5735" 解题思路: 定义一个 函数用于计算第 $i$ 个点和 $j$ 个点的距离,然后调用这个函数分别计算三点之间的距离并求和即可。 示例代码如下: 阅读全文
posted @ 2020-04-28 11:59 quanjun 阅读(796) 评论(0) 推荐(0)
摘要: 题目链接: "https://www.luogu.com.cn/problem/P1789" 解题思路: 开一个 $n \times n$ 的 bool 类型的二维数组 $a$,一开始 $a$ 中所有的元素都为 false。 然后根据给我们的坐标和类型(火把或萤石)点亮相应的位置。最后统计有多少个点 阅读全文
posted @ 2020-04-24 17:53 quanjun 阅读(445) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 55 下一页