上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: 题目链接:https://vjudge.net/problem/POJ-1113 题目链接:https://vjudge.net/problem/POJ-3348 安德鲁真的巨快无比。 具体看注释 1 /************************************************ 阅读全文
posted @ 2019-10-13 16:10 小布鞋 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/POJ-2079 graham跑的巨慢,Andrew跑的巨快。还好写。 有两种写法。 旋转卡壳枚举三个点的(94ms) 1 /******************************************************* 阅读全文
posted @ 2019-10-13 15:56 小布鞋 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/HDU-1007 总所周知,离散课上学算法,用分治求平面最近点对。 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N = 1e5+9; 4 const doub 阅读全文
posted @ 2019-10-12 17:10 小布鞋 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/POJ-1981 由于选择的单位圆肯定至少覆盖一个点,所以我们枚举i作为单位圆必定覆盖的点,然后单位圆的圆心必定在以点 i 为圆心的单位圆上,然后枚举其他点 j ,只要单位圆圆心在以 j 为圆心的单位圆上,那么选的单位圆就可以覆盖到点 阅读全文
posted @ 2019-10-11 17:57 小布鞋 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 学到了树上启发式合并这个东西,其实本质就是暴力,果然应了那句:世界万物皆暴力。 这是处理树上问题强有力的工具。 首先我们有三个函数 dfs2,clear,insert。dfs2用于处理以该节点为根节点的子树的答案,并且保留其信息。clear为清空该子树信息,insert为插入(合并)该子树信息。 大 阅读全文
posted @ 2019-10-10 16:26 小布鞋 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/POJ-3608 1 #include<iostream> 2 #include<cstdio> 3 #include<cmath> 4 #include<algorithm> 5 using namespace std; 6 #def 阅读全文
posted @ 2019-10-06 10:45 小布鞋 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/POJ-2187 旋转卡壳模板题。参考了hzwer(http://hzwer.com/4224.html) 1 #include<iostream> 2 #include<cstdio> 3 #include<cmath> 4 #inc 阅读全文
posted @ 2019-10-04 17:43 小布鞋 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<cmath> 3 #include<cstdio> 4 using namespace std; 5 struct Point{ 6 double x,y; 7 Point operator - (const Point& b)cons 阅读全文
posted @ 2019-10-04 12:29 小布鞋 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 存一下公式。 原文链接:https://blog.csdn.net/qq_43472263/article/details/101635949 公式:dis(A,B) = R*arccos(cos(wA)*cos(wB)*cos(jB-JA)+sin(wA)*sin(wB)); (wA表示A点的纬度 阅读全文
posted @ 2019-10-04 11:33 小布鞋 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.luogu.org/problem/P1742 打乱之后就是O(n)的了。然后还有个求三角形外接圆的。 1 #include<iostream> 2 #include<cstdio> 3 #include<cmath> 4 #include<algorithm> 5 阅读全文
posted @ 2019-10-04 11:14 小布鞋 阅读(152) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页