POJ 3293 Rectilinear polygon problem solution "Challenge Programming Contest"

POJ 3293 Rectilinear polygon problem solution "Challenge Programming Contest"
POJ 3293 Rectilinear polygon at a right angle polygons: Given N points, and asked whether a polygon composed of right angles (right angles and each vertex of the other two vertices, each side parallel to the axis), and calculates the circumference? 3.6 Calculation dealing with plane and space plane geometry scan of scanning line moves the line if the number of points is even, then the two adjacent points constituting an edge, recorded; if odd, can not constitute (remainder not composed of a point side). Switching the scanning line to another axis, similar logic executed, but need to check the lateral edge intersects the longitudinal edges, if the intersection is not configured. #include <iostream ...

Continue reading : yard farm >> POJ 3293 Rectilinear Polygon problem solution "Challenge Programming Contest"

Original link : http://www.hankcs.com/program/algorithm/poj-3293-rectilinear-polygon.html

Reproduced in: https: //my.oschina.net/hankcs/blog/378675

Guess you like

Origin blog.csdn.net/weixin_34409741/article/details/91780235