
几何
霍雨浩——舞麟
这个作者很懒,什么都没留下…
展开
-
umi和弓道 计算几何 详解
题目链接:https://ac.nowcoder.com/acm/contest/3002/C题目:思路:和(x0,y0) ,在同一象限的无法挡住要射中k个,只用挡住n−k个即可1,对于每个靶子与(x0,y0)的连线交于y 轴时,把这一点当住即挡住了一个靶子,把所有交在y 轴的点统计排序,找到最近的n−k 个点,即最小长度2,每个靶子与(x0,y0)的连线交于x 轴时,同理找一个最小值,结果取最小即可#include<bits/stdc++.h>using namespace原创 2020-07-20 23:00:42 · 172 阅读 · 0 评论 -
CGL_4_A——Convex Hull 求凸包
题目链接:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=CGL_4_A题目给出一个多边形,要求出这个多边形的凸包;在一个点集D中,按一定顺序选取子集Q使得Q中所有点顺次连接所构成的封闭凸多边形包住D中所有点可以形象地理解为:有许多个钉子钉在平面上,用一根牛皮筋把所有点包住找出凸包的思路是:先把题目给出的多边形的点集合按...原创 2020-04-03 09:58:10 · 315 阅读 · 0 评论 -
Intersection——判断两条线段能不能相交
IntersectionFor given two segments s1 and s2, print “1” if they are intersect, “0” otherwise.s1 is formed by end points p0 and p1, and s2 is formed by end points p2 and p3.InputThe entire input lo...原创 2020-04-02 11:25:33 · 331 阅读 · 0 评论 -
Counter-Clockwise 三点位置关系 计算几何学
题目链接:https://vjudge.net/problem/Aizu-CGL_1_C#include<bits/stdc++.h>using namespace std;#define ll long longint main(){ double x0,y0,x1,y1; scanf("%lf%lf%lf%lf",&x0,&y0,&...原创 2020-04-02 05:17:16 · 418 阅读 · 0 评论