上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4839 【题解】 pkusc怎么出bzoj原题啊 字符串随便处理一下就行了,大模拟 pkusc:2A(freopen调试没删) 线下:2A(数组不够大) # include <stdio.h> 阅读全文
posted @ 2017-05-21 22:11 Galaxies 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4883 【题解】 我们如果把行列建点,将一个实际的点看作一条边(连接对应行列),那么题目转化为 对于边定向,使得每个点度数为1,权值和最小。 稍微想一下会发现这样就相当于求一个n+m+1个边的最 阅读全文
posted @ 2017-05-21 21:28 Galaxies 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1003 【题解】 瞎预处理瞎[i,j]天的最短路 dp处理即可。f[i]=min(f[j]+dis[i,j,n]*(i-j))+K # include <queue> # include <st 阅读全文
posted @ 2017-05-21 19:26 Galaxies 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题面搬来的qwq(忘记出处了 水印应该能表示) 【题解】 1. 我们看到这题先想到令(x+y+z)^3 展开得到一坨,稍微减减,得到我们要求证 delta = 3xy^2+3xz^2+3yx^2+3yz^2+3zx^2+3zy^2+9xyz 能被(x+y+z)整除 卧槽这什么鬼啊赶紧消系数 分分类 阅读全文
posted @ 2017-05-19 20:17 Galaxies 阅读(628) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://poj.org/problem?id=2187 【题解】 凸包、卡壳模板 # include <math.h> # include <stdio.h> # include <string.h> # include <iostream> # include <algorithm> 阅读全文
posted @ 2017-05-18 19:47 Galaxies 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://bailian.openjudge.cn/practice/2505/ 【题解】 我们找找规律: 1~9显然是Stan wins. 10~18是Ollie wins. 19~162是Stan wins... 发现分界线是18^? 判判就行了。 # include <stdio. 阅读全文
posted @ 2017-05-18 17:55 Galaxies 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://poj.org/problem?id=2420 【题解】 费马点问题,模拟退火。%.0f神坑 # include <math.h> # include <stdio.h> # include <stdlib.h> # include <string.h> # include < 阅读全文
posted @ 2017-05-18 09:55 Galaxies 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://poj.org/problem?id=1379 【题解】 题目大意:求(0,0)->(X,Y)内的一个点,使得这个点到给定的n个点的最小距离最大。 模拟退火 一开始可以先把4个顶点加入。 调调参就过样例了。 然后就过了 # include <math.h> # include 阅读全文
posted @ 2017-05-18 08:51 Galaxies 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://bailian.openjudge.cn/practice/3383/ 【题解】 题目就是最小支配集。 学习了最小支配集的解法: 树形dp(有空可以推一推) 贪心:DFS遍历后逆DFS序进行处理,如果当前这个点不在支配集而且没和支配集连边,那么标记它父亲为支配集成员并处理父亲的 阅读全文
posted @ 2017-05-17 21:36 Galaxies 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://bailian.openjudge.cn/practice/4092 【题解】 这啥玩意儿啊写个暴力就没了 怎么一直wa啊。。。 注意要把ans清空啊。。。wori # include <stdio.h> # include <string.h> # include <iost 阅读全文
posted @ 2017-05-17 09:45 Galaxies 阅读(204) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页