
计算几何算法题目
# 计算几何algorithm
OPA_heiyaa
嗨嗨嗨
展开
-
模板--判断两条线段是否相交--计算几何
模板--判断两条线段是否相交--计算几何;两个结构体表示的是该条直线的A,B两个端点;const int maxa=1e2+10;const double pi=0.00000001;struct nodea{ int x,y;}a[maxa];struct nodeb{ int x,y;}b[maxa];bool check(nodea a,nodeb b,nodea c,nodeb d){ if(!(min(a.x,b.x)<=max(c.x,d.x) &原创 2020-05-18 10:29:28 · 1648 阅读 · 2 评论 -
UVA--191--计算几何--判断线段交点--入坑
You are to write a program that has to decide whether a givenline segment intersects a given rectangle.An example:line: start point: (4,9)end point: (11,2)rectangle: left-top: (1,5)right-bottom: (7,1)The line is said to intersect the rectangle if t.原创 2020-05-19 20:39:39 · 260 阅读 · 0 评论 -
ZOJ--1648--计算几何--判断线段交点--没坑
On the circuit board, there are lots of circuit paths. We know the basic constrain is that no two path cross each other, for otherwise the board will be burned.Now given a circuit diagram, your task is to lookup if there are some crossed paths. If not fin原创 2020-05-19 20:34:37 · 320 阅读 · 0 评论 -
CodeForces--1C--计算几何
Nowadays all circuses in Berland have a round arena with diameter 13 meters, but in the past things were different.In Ancient Berland arenas in circuses were shaped as a regular (equiangular) polygo...原创 2020-02-11 11:03:41 · 374 阅读 · 0 评论 -
CodeForces--231D--思维
One day Vasya was going home when he saw a box lying on the road. The box can be represented as a rectangular parallelepiped. Vasya needed no time to realize that the box is special, as all its edges ...原创 2020-02-11 10:59:58 · 174 阅读 · 0 评论 -
HDU--1115--计算重心
There are many secret openings in the floor which are covered by a big heavy stone. When the stone is lifted up, a special mechanism detects this and activates poisoned arrows that are shot near the o...原创 2020-02-11 10:57:24 · 214 阅读 · 0 评论