上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 73 下一页
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4300 记录一下 mx[j] 表示以第 j 位上是1的元素结尾的子序列长度最大值,转移即可。 代码如下: 阅读全文
posted @ 2018-11-01 08:29 Zinn 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1798 这题还4A... 注意:cnt 从1开始;各种模 p;乘法标记初始值是 1;可能乘 0。 代码如下: 阅读全文
posted @ 2018-11-01 08:13 Zinn 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=3932 找一个位置使距离最远的点的距离最小; 上模拟退火; 每次向距离最远的点移动,注意判断一下距离最远的点距离为0的情况。 代码如下: 阅读全文
posted @ 2018-10-31 22:28 Zinn 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2899 模拟退火; 怎么也过不了,竟然是忘了写 lst = tmp ... 还是挺容易A的。 代码如下: 阅读全文
posted @ 2018-10-31 21:45 Zinn 阅读(166) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-10-31 21:24 Zinn 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-10-31 20:26 Zinn 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.luogu.org/record/show?rid=12702916 https://www.lydsy.com/JudgeOnline/problem.php?id=1168 一眼不可做...即使数据范围很小... #include<iostream> #includ 阅读全文
posted @ 2018-10-31 14:54 Zinn 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 题目:http://poj.org/problem?id=2069 仍是随机地模拟退火,然而却WA了; 看看网上的题解,都是另一种做法——向距离最远的点靠近; 于是也改成那样,竟然真的A了...感觉这个做法的随机因素好像很小?不过似乎也是一种套路。 代码如下: 阅读全文
posted @ 2018-10-30 17:52 Zinn 阅读(230) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-10-30 17:16 Zinn 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 题目:http://poj.org/problem?id=2420 给出 n 个点的坐标,求费马点; 上模拟退火。 代码如下: 阅读全文
posted @ 2018-10-30 14:59 Zinn 阅读(136) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 73 下一页