上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 47 下一页

2014年10月26日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5073这题的关键是要把p点减重心位置 的 平方的那个式子展开,就可以O(n),开始ans初始化为1e18一直wa,改成1e19就A了最大的部分是连续的,头尾指针一起移动就可以#include #include #i... 阅读全文
posted @ 2014-10-26 16:29 LegendaryAC 阅读(598) 评论(0) 推荐(0) 编辑

2014年10月22日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1082这题开始想复杂了,error并不包括表达式本身不合法的情况我的方法是遇到右括号就开始处理栈,如果开始最外层没有括号,就人为加上数据应该是比较弱的,一通乱搞#include #include #include ... 阅读全文
posted @ 2014-10-22 10:51 LegendaryAC 阅读(247) 评论(0) 推荐(0) 编辑

2014年10月19日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5067规定起点和终点的tsp问题,解法依然是状态压缩dp,在初始化和计算答案的时候略做改动即可#include #include #include #include using namespace std ;con... 阅读全文
posted @ 2014-10-19 16:58 LegendaryAC 阅读(180) 评论(0) 推荐(0) 编辑

2014年10月18日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4856西安邀请赛的一道题,这道题我们当时在现场最后1h才发现时状态压缩dp,惊险写出现在回头想发现当时有点呆,这种明显tsp模型的题目当时鬼迷心窍去写搜索,超时而不知悔改,实际是水题一道#include #incl... 阅读全文
posted @ 2014-10-18 23:09 LegendaryAC 阅读(202) 评论(0) 推荐(0) 编辑

2014年10月17日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3932一定范围的平面上给一些点,求到这些点的最大距离最小,和上一题的题意正好相反,稍微改一下就可以这个问题又叫最小圆覆盖#include #include #include #include #include #i... 阅读全文
posted @ 2014-10-17 23:25 LegendaryAC 阅读(182) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1109一个范围内给一堆点,求到这些点的最短距离最大模拟退火,温度是步长#include #include #include #include #include #include using namespace st... 阅读全文
posted @ 2014-10-17 23:18 LegendaryAC 阅读(385) 评论(0) 推荐(0) 编辑

2014年10月7日

摘要: 任意点(x,y),绕一个坐标点(rx0,ry0)逆时针旋转a角度后的新的坐标设为(x0, y0),有公式:x0= (x - rx0)*cos(a)- (y - ry0)*sin(a) + rx0 ;y0= (x - rx0)*sin(a) + (y - ry0)*cos(a) + ry0 ; 阅读全文
posted @ 2014-10-07 12:23 LegendaryAC 阅读(574) 评论(0) 推荐(0) 编辑

2014年10月6日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5050大数gcdimport java.io.* ;import java.math.* ;import java.util.* ;import java.text.* ;public class Main { ... 阅读全文
posted @ 2014-10-06 22:32 LegendaryAC 阅读(210) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5045题意:n个学生m道题,一个n*m的矩阵代表第n个学生解第m题AC的概率,任意两学生做题数差距不能大于1,问AC所有题目概率的最大值由于限制条件,所以一定是以n个学生为单位,一轮一轮的做题,直到做m题为止,这样... 阅读全文
posted @ 2014-10-06 16:33 LegendaryAC 阅读(613) 评论(0) 推荐(0) 编辑

2014年10月5日

摘要: #define MOD 2008#define Mat 35 //矩阵大小 struct mat{//矩阵结构体,a表示内容,r行c列 矩阵从1开始 int a[Mat][Mat]; int r, c; mat() { r = c = 0; ... 阅读全文
posted @ 2014-10-05 01:30 LegendaryAC 阅读(189) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 47 下一页