随笔分类 - 计算几何
摘要:题:http://acm.hdu.edu.cn/showproblem.php?pid=6759 题意:给定n个点,每个点在同一水平方向运动,给定n个点的起点和加速度,求运动期间有多少个点可以作为唯一最前 分析:假设点i要追上点j,那么 pi+ai∗t2/2>pj+aj∗t2/2 化简得t2/2>(
阅读全文
摘要:题:https://ac.nowcoder.com/acm/contest/5667/B 题意:给出n个二维平面点,问最多有多少个点和原点(0,0)同时在同一个圆的边上 分析:由三点确定圆心n^2枚举出所有圆心,最后求众数即可; 由于我们n^2枚举出来的圆心个数是由重复部分的,因为假设1,2,3,4
阅读全文
摘要:题:http://acm.hdu.edu.cn/showproblem.php?pid=4637 参考自:https://www.cnblogs.com/javawebsoa/p/3239001.html #include<bits/stdc++.h> using namespace std; #d
阅读全文
摘要:模版题: http://acm.hdu.edu.cn/showproblem.php?pid=1392(Graham算法) #include<bits/stdc++.h> using namespace std; const int M=1e3+3; struct tu{ double x,y; t
阅读全文
摘要:学习:https://blog.csdn.net/qq_21334057/article/details/99550805 题意:从n个点中选择k个点构成多边形,问期望面积。 题解:如果能够确定两个点,那么可以从这两个点之间选择k−2个点来构成一个k边形。所以可以枚举两个点,计算这两个点被选入构成凸
阅读全文
摘要:http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1005&cid=867 #include<iostream> #include<cstring> #include<algorithm> #include<cstdio> #inc
阅读全文
摘要:Input The first line of input contains a single integer P, (1 ≤ P ≤ 1000), which is the number of data sets that follow. Each data set should be proce
阅读全文