![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学几何
creator平
期望破茧成蝶时的飞翔,向往突破蝉蛹后的鸣叫。
展开
-
ALDS1_2_A: Bubble Sort(几何)
Bubble SortWrite a program of the Bubble Sort algorithm which sorts a sequenceAin ascending order. The algorithm should be based on the following pseudocode:BubbleSort(A)1 for i = 0 to A.lengt...原创 2019-08-14 08:45:45 · 175 阅读 · 0 评论 -
CGL_4_A——Convex Hull(求凸包)
Convex HullFind the convex hull of a given set of pointsP. In other words, find the smallest convex polygon containing all the points ofP. Here, in a convex polygon, all interior angles are les...原创 2019-08-16 17:16:44 · 625 阅读 · 0 评论 -
CGL_3_C——Polygon-Point Containment(点与多边形的位置关系判断)
Polygon-Point-ContainmentFor a given polygongand target pointst, print "2" ifgcontainst, "1" iftis on a segment ofg, "0" otherwise.gis represented by a sequence of pointsp1,p2,...,...原创 2019-08-16 16:21:10 · 523 阅读 · 0 评论 -
CGL_1_A——Projection(几何基础)
ProjectionFor given three pointsp1,p2,p, find the projection pointxofpontop1p2.Inputp1 p1 p2 p2qp0 p0p1 p1...pq−1 pq−1In the first line, integer coordinates ofp1andp2are ...原创 2019-08-12 17:16:01 · 400 阅读 · 0 评论 -
CGL_3_B——Is-Convex(判凸包)
Is-ConvexFor a given polygong, print "1" ifgis a convex polygon, "0" otherwise. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.gis represented by a seq...原创 2019-08-16 12:03:25 · 447 阅读 · 6 评论 -
CGL_3_A——Area(多边形面积)
AreaFor a given polygong, computes the area of the polygon.gis represented by a sequence of pointsp1,p2,...,pnwhere line segments connectingpiandpi+1(1 ≤i≤n−1) are sides ofg. The l...原创 2019-08-16 10:56:23 · 253 阅读 · 0 评论 -
CGL_2_D——Distance(求两线段距离)
DistanceFor given two segmentss1ands2, print the distance between them.s1is formed by end pointsp0andp1, ands2is formed by end pointsp2andp3.InputThe entire input looks like:...原创 2019-08-15 20:03:21 · 359 阅读 · 0 评论 -
CGL_2_C——Cross Point(求线段交点)
Cross PointFor given two segmentss1ands2, print the coordinate of the cross point of them.s1is formed by end pointsp0andp1, ands2is formed by end pointsp2andp3.InputThe entire i...原创 2019-08-15 18:02:57 · 194 阅读 · 0 评论 -
CGL_2_B——Intersection(线段几何---判断线段是否相交)
IntersectionFor given two segmentss1ands2, print "1" if they are intersect, "0" otherwise.s1is formed by end pointsp0andp1, ands2is formed by end pointsp2andp3.InputThe entire i...原创 2019-08-15 11:36:43 · 294 阅读 · 0 评论 -
Parallel/Orthogonal (线段几何1)
Parallel/OrthogonalFor given two liness1ands2, print "2" if they are parallel, "1" if they are orthogonal, or "0" otherwise.s1crosses pointsp0andp1, ands2crosses pointsp2andp3.Inp...原创 2019-08-14 18:05:44 · 194 阅读 · 0 评论 -
CGL_1_B: Reflection(几何)
ReflectionFor given three pointsp1, p2, p, find the reflection pointxofpontop1p2.Inputxp1 yp1 xp2 yp2qxp0 yp0xp1 yp1...xpq−1 ypq−1In the first line, integer coordinates ofp1...原创 2019-08-13 11:44:44 · 368 阅读 · 0 评论