
计算几何
文章平均质量分 81
旺 崽
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
第一届河北工业大学程序设计竞赛校赛(同步赛)I.面基and散步
题目链接题目描述滑稽和竭泽相约在某个公园面基,公园中间有一个巨大的圆形操场。滑稽在A点,竭泽在B点。竭泽决定用最短的距离跑到滑稽身边。然而圆形操场正在施工,竭泽不能横跨操场,只能在不经过操场里面的前提下快速找到滑稽。两人见到之后,按照特定路线散步,路线如下:规定竭泽找滑稽的最短路径为L,操场圆心为O, OA, OB连线, 绕着L->AO->操场边缘->OB走了一圈,散步的过程也不能经过操场里面竭泽很好奇,他们走过的路线围成的面积是多少呢?右图中红色的线为散步的路线图输入描原创 2021-05-12 16:41:21 · 1962 阅读 · 0 评论 -
AtCoder Beginner Contest 197(Sponsored by Panasonic)D.Opposite
题目链接Problem StatementOn a two-dimensional coordinate plane where the x axis points to the right and the y axis points up, we have a regularN-gon with N vertices p0,p1,p2,…,pN−1p_0,p_1,p_2,…,p_{N−1}p0,p1,p2,…,pN−1.Here, N is guaranteed to be even, a原创 2021-03-29 21:35:54 · 2038 阅读 · 0 评论 -
CSP 202009-4 星际旅行
题目链接简单几何~这题我一开始想复杂了,在判断线段和黑洞是否相交时以为要算 nnn 维直线方程,再套一个题目所给的距离公式,后来发现那完全是误导~我们不妨想想题目为什么要给海伦公式,仔细一想任意两点和黑洞中心的三角形的高不就是距离么,这样一来,在判断位置关系上的难点就解决了~那么如果两点所连线段有一部分在黑洞内部,显然我们必须要求一段弧长,拿二维举例,如下图:我们要求弧 CD,就必须要求出 ∠β∠\beta∠β,而 β=∠AOB−∠α−∠γ\beta=∠AOB-∠\alpha-∠\gammaβ原创 2021-03-18 10:06:05 · 1796 阅读 · 0 评论 -
2021牛客寒假算法基础集训营1 E.三棱锥之刻
2021牛客寒假算法基础集训营1 E.三棱锥之刻题目链接题目描述牛牛站在一个棱长为的正三棱锥内部的中心。(牛牛是不可移动的)(所谓正三棱锥,指六条棱都相等的三棱锥。正三棱锥的中心指到 4 个顶点距离都相等的那个点)如上图,AB=AC=BC=AD=BD=CD=aAB=AC=BC=AD=BD=CD=aAB=AC=BC=AD=BD=CD=a,牛牛站在P点,PA=PB=PC=PDPA=PB=PC=PDPA=PB=PC=PD他拿着一个染色喷雾,可以用来给正三棱锥的内表面染色。已知喷雾能喷洒的距离为。也原创 2021-02-10 18:34:34 · 1777 阅读 · 0 评论 -
超级码力在线编程大赛初赛 第2场 1.三角魔法
超级码力在线编程大赛初赛 第2场 1.三角魔法题目链接描述小栖必须在一个三角形中才能施展魔法,现在他知道自己的坐标和三个点的坐标,他想知道他能否施展魔法−1e9≤xi,yi≤1e9-1e9\leq x_i,y_i\leq 1e9−1e9≤xi,yi≤1e9点在边上也属于三角形内示例输入triangle = [[0,0],[2,0],[1,2]] point= [1,1]输出"Yes"输入:triangle = [[0,0],[2,0],[1,1]] point= [2,1]原创 2020-08-30 15:50:40 · 2601 阅读 · 0 评论 -
牛客小白月赛2 B.小马过河
牛客小白月赛2 B.小马过河题目链接链接:https://ac.nowcoder.com/acm/contest/86/B来源:牛客网题目描述Eteˊreo\mathrm{Et\acute{e}reo}Eteˊreo 开始涉猎几何领域了。他现在正在研究小马喝水问题。众所周知,这个问题中有一匹口渴的小马,一条笔直的河,以及小马的家。小马需要去河边喝水,然后再去家里。它需要走最短的路径。解决这个问题也很简单,其中有一个步骤是要做小马家关于河水的对称点。Eteˊreo\mathrm{Et\acu原创 2020-08-13 18:00:27 · 2799 阅读 · 0 评论 -
2020牛客暑期多校训练营(第三场)C.Operation Love
2020牛客暑期多校训练营(第三场)C.Operation Love题目链接题目描述Alice is a beauty in a robot society. So many robots want to marry her. Alice determines to marry a robot who can solve the following puzzle:Firstly, the shape of Alice’s right palm is as follow:And the shape原创 2020-07-18 20:49:38 · 2896 阅读 · 0 评论 -
2020牛客暑期多校训练营(第二场)B.Boundary
2020牛客暑期多校训练营(第二场)B.Boundary题目链接题目描述Given n{n}n points in 2D plane. Considering all circles that the origin point (0,0){(0, 0)}(0,0) is on their boundries, find the one with the maximum given points on its boundry. Print the maximum number of points.输入原创 2020-07-14 20:43:56 · 2648 阅读 · 0 评论 -
2019牛客暑期多校训练营(第三场)H.Magic Line
2019牛客暑期多校训练营(第三场)H.Magic Line题目链接题目描述There are always some problems that seem simple but is difficult to solve.ZYB got N\ N N distinct points on a two-dimensional plane. He wants to draw a magic line so that the points will be divided into原创 2020-06-21 16:36:56 · 2427 阅读 · 0 评论 -
Educational Codeforces Round 87 (Rated for Div. 2) C2.Not So Simple Polygon Embedding
Educational Codeforces Round 87 (Rated for Div. 2) C2.Not So Simple Polygon Embedding题目链接The statement of this problem is the same as the statement of problem C1. The only difference is that, in problem C1, n is always even, and in C2, n is always odd.Y原创 2020-05-27 09:47:23 · 2403 阅读 · 0 评论 -
牛客练习赛60 B.三角形周长和
牛客练习赛60 B.三角形周长和题目链接题目描述给定平面上n个点的坐标,并且我们定义两个点的距离为曼哈顿距离.曼哈顿距离是指对两个点 (x1,y1),(x2,y2)(x_1,y_1),(x_2,y_2)(x1,y1),(x2,y2),他们之间的距离为∣x2−x1∣+∣y2−y1∣|x_2 - x_1| + |y_2 - y_1|∣x2−x1∣+∣y2−y1∣.众所周知三个点...原创 2020-03-28 10:06:08 · 2210 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第二场)C.message
牛客网暑期ACM多校训练营(第二场)C.message题目描述There is an infinite plane. White Cloud has n lines which are not parallel to the Oy axis. These lines in the plane are in the form y=ax+b.White Rabbit will have a tr...原创 2020-02-24 09:15:46 · 2728 阅读 · 0 评论 -
POJ 1584 A Round Peg in a Ground Hole
POJ 1584 A Round Peg in a Ground HoleDescriptionThe DIY Furniture company specializes in assemble-it-yourself furniture kits. Typically, the pieces of wood are attached to one another using a wooden...原创 2020-02-21 10:42:20 · 2700 阅读 · 0 评论 -
POJ 3449 Geometric Shapes
POJ 3449 Geometric ShapesDescriptionWhile creating a customer logo, ACM uses graphical utilities to draw a picture that can later be cut into special fluorescent materials. To ensure proper processi...原创 2020-02-20 17:42:46 · 2869 阅读 · 0 评论 -
POJ 1039 Pipe
POJ 1039 PipeDescriptionThe GX Light Pipeline Company started to prepare bent pipes for the new transgalactic light pipeline. During the design phase of the new pipe shape the company ran into the p...原创 2020-02-19 10:44:43 · 2756 阅读 · 0 评论 -
POJ 2826 An Easy Problem?!
POJ 2826 An Easy Problem?!DescriptionIt’s raining outside. Farmer Johnson’s bull Ben wants some rain to water his flowers. Ben nails two wooden boards on the wall of his barn. Shown in the pictures ...原创 2020-02-17 12:39:43 · 2816 阅读 · 0 评论 -
2020牛客寒假算法基础集训营5 B.牛牛战队的比赛地
2020牛客寒假算法基础集训营5 B.牛牛战队的比赛地题目描述由于牛牛战队经常要外出比赛,因此在全国各地建立了很多训练基地,每一个基地都有一个坐标(x,y)。这周末,牛牛队又要出去比赛了,各个比赛的赛点都在xx轴上。牛牛战队为了方便比赛,想找一个到达训练基地最大距离最小的地方作为比赛地。这个问题对于牛牛战队太简单了,它就交给了你,你来帮他算一下~输入描述:输入数据第一行包含一个整数N(...原创 2020-02-14 11:46:35 · 4181 阅读 · 2 评论 -
POJ 3347 Kadj Squares
POJ 3347 Kadj SquaresDescriptionIn this problem, you are given a sequence S1,S2,...,SnS_1, S_2, ..., S_nS1,S2,...,Sn of squares of different sizes. The sides of the squares are integer numbers. W...原创 2020-01-29 11:42:38 · 2660 阅读 · 0 评论 -
POJ 1696 Space Ant
POJ 1696 Space AntDescriptionThe most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y1999 and called it M11. It...原创 2020-01-28 18:24:41 · 2811 阅读 · 0 评论 -
POJ 1410 Intersection
POJ 1410 IntersectionDescriptionYou are to write a program that has to decide whether a given line segment intersects a given rectangle.An example:line: start point: (4,9)end point: (11,2)rectan...原创 2020-01-28 12:18:26 · 2728 阅读 · 0 评论 -
POJ 1066 Treasure Hunt
POJ 1066 Treasure Hunt##DescriptionArcheologists from the Antiquities and Curios Museum (ACM) have flown to Egypt to examine the great pyramid of Key-Ops. Using state-of-the-art technology they are ...原创 2020-01-27 17:54:32 · 2698 阅读 · 0 评论 -
POJ 2653 Pick-up sticks
POJ 2653 Pick-up sticksDescriptionStan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is...原创 2020-01-27 16:37:17 · 2747 阅读 · 0 评论 -
POJ 1127 Jack Straws
POJ 1127 Jack StrawsDescriptionIn the game of Jack Straws, a number of plastic or wooden “straws” are dumped on the table and players try to remove them one-by-one without disturbing the other straw...原创 2020-01-26 17:45:47 · 2676 阅读 · 0 评论 -
POJ 1556 The Doors
POJ 1556 The DoorsDescriptionYou are to find the length of the shortest path through a chamber containing obstructing walls. The chamber will always have sides at x = 0, x = 10, y = 0, and y = 10. T...原创 2020-01-26 14:20:36 · 2653 阅读 · 0 评论 -
POJ 1269 Intersecting Lines
POJ 1269 Intersecting LinesDescriptionWe all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection...原创 2020-01-22 13:42:16 · 2601 阅读 · 0 评论 -
POJ 3304 Segments
POJ 3304 SegmentsDescriptionGiven n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected seg...原创 2020-01-21 15:55:11 · 2584 阅读 · 0 评论 -
POJ 2398 Toy Storage
POJ 2398 Toy StorageDescriptionMom and dad have a problem: their child, Reza, never puts his toys away when he is finished playing with them. They gave Reza a rectangular box to put his toys in. Unf...原创 2020-01-04 17:04:23 · 2681 阅读 · 0 评论 -
POJ 2318 TOYS
POJ 2318 TOYSDescriptionCalculate the number of toys that land in each bin of a partitioned toy box.Mom and dad have a problem - their child John never puts his toys away when he is finished playin...原创 2020-01-04 11:30:40 · 2656 阅读 · 0 评论 -
HHUOJ 1887 班级聚会上的游戏
HHUOJ 1887 班级聚会上的游戏题目描述前不久小明所在的班级为了庆祝在运动会上夺得第一名,开了一场班级聚会。在聚会上大家玩了这样一个游戏:在地上放一个圆形硬纸片,然后参加游戏的人手里拿一个尺寸随机的圆形硬纸片,向地上的硬纸片扔过去,如果两个圆形硬纸片有相交的部分,则可以获得一次抽奖的机会。现在,告诉你两个圆形硬纸片的圆心坐标和半径长度,请你计算它们相交的面积。输入输入包含多组测试...原创 2019-11-16 11:18:28 · 2843 阅读 · 0 评论 -
POJ 1654 Area
POJ 1654 AreaDescriptionYou are going to compute the area of a special kind of polygon. One vertex of the polygon is the origin of the orthogonal coordinate system. From this vertex, you may go step...原创 2019-11-16 11:02:31 · 2779 阅读 · 0 评论 -
HHUOJ 1413 镜面对称
HHUOJ 1413 镜面对称题目描述给你一个简单多边形,请你判断这个简单多边形是不是镜面对称的。输入输入包含多组测试数据。每组输入的第一行是一个整数N(3<=N<=500),表示简单多边形有N个顶点。接下来N行,每行输入两个整数x和y,表示简单多边形的某个顶点坐标。顶点坐标保证按照顺时针顺序输入。输出对于每组输入,如果此简单多边形是镜面对称的则输出“YES”,否则输...原创 2019-11-13 21:29:17 · 3394 阅读 · 0 评论 -
HHUOJ 1410 矩形问题
HHUOJ 1410 矩形问题题目描述现给你若干矩形,矩形的边都平行于x轴和y轴,请你编程计算被其他矩形包含在内部的矩形的个数(如果内部的矩形的边与外部的矩形的边重合,也算作正确的结果)。输入输入包含多组测试数据。每组输入第一行是一个整数n(n<=100),表示矩形个数。接下来n行,每行输入四个实数,分别表示矩形的最小x坐标、最大x坐标、最小y坐标、最大y坐标。输出对于每组输入...原创 2019-11-03 10:49:04 · 2895 阅读 · 0 评论 -
HHUOJ 1412 计算圆的周长
HHUOJ 1412 计算圆的周长题目描述如果告诉你圆的直径,那么计算圆的周长是非常简单的。但是,这次不告诉你圆的直径。现给你圆周上三个点的坐标,请你计算圆的周长。输入输入包含多组测试数据。每组输入包含6个实数x1,y1,x2,y2,x3,y3,表示圆周上三个点的坐标。圆的直径不会超过1000000。输出对于每组输入,输出圆的周长,结果保留2位小数。(pi的取值为3.1415926...原创 2019-11-02 16:46:49 · 2770 阅读 · 0 评论 -
HHUOJ 1408 在披萨店里的思考
HHUOJ 1408 在披萨店里的思考题目描述今天小明来到一家披萨店吃披萨,由于实在太饿了,他决定点一个超大的披萨。不过这家店很奇怪,制作的披萨都是矩形的。于是爱思考的小明想知道这个披萨能否完全放置于自己所在的圆桌之内,也就是披萨是否一定会有部分悬空于桌边之外。请你编程帮他解决。输入输入包含多组测试数据。每组输入数据一开始为一个整数r(1<=r<=1000),表示圆桌面的半径,...原创 2019-10-29 21:19:15 · 2790 阅读 · 0 评论