Introduction to poj ry)
In fact, we can't talk about the recommendation. It's just a question we have done, and even some questions are not AC, so we are struggling. The reason why Calculation of geometric issues is recommended is that I feel that calculation of geometric issues in ACM algorithms is a more practical algorithm and has an important use in many fields (such as my major and GIS ). If you have the opportunity in the future, I will add and improve this list.
Features and essentials of solving computational geometric questions:
1. Most of them won't be difficult, and a few of them have clever ideas.
2. For computational geometric questions, templates are very important and must be highly reliable.
3. Pay attention to the Code Organization, because it is easy to have two hundred lines of code on the computing geometric question, most of which are templates. If the code is messy, the correct rate of the question is seriously affected.
4. Pay attention to precision control.
5. Try to use integers where integers can be used. Think of a method to expand the data (double or expand sqrt2 ). Because integers do not have to consider floating point errors, and the operation is faster than floating point.
I. Point, line, surface, basic relationship of shape, understanding of dot product cross product
Poj 2318 toys (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2318
Poj 2398 Toy storage (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2398
A rectangle is divided into N grids by several straight lines to give the coordinates of a vertex and ask which vertex the vertex is located in.
Knowledge point: in fact, it is the judgment in the convex quadrilateral. If the cross product is used, it can be solved in two parts.
Poj 3304 segments
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3304
Knowledge Point: intersection of line segments and straight lines. Handle the overlap points during enumeration.
Poj 1269 intersecting lines
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1269
Knowledge Point: determines the intersection of a straight line and calculates the intersection point.
Poj 1556 the doors (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1556
Knowledge Point: simple graph theory + simple computation of ry, first obtain the intersection of line segments, and then use dij to find the shortest path.
Poj 2653 pick-up sticks
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2653
Knowledge Point: or line segment intersection judgment
Poj 1066 treasure hunt
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1066
Knowledge Point: determines the intersection of line segments, but you must first understand what the "minimum door" is.
Poj 1410 Intersection
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1410
Knowledge Point: The line segments and rectangles intersect. Correctly understand the definition of intersection in question meaning.
See: http://hi.baidu.com/novosbirsk/blog/item/68c682c67e8d1f1d9d163df0.html
Poj 1696 space ant (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1696
A good question for the Tehran division. Need to understand the properties of the dot product cross product
Poj 3347 kadj squares
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3347
My methods are extremely cumbersome. Complex line segment intersection problems. This topic is a typical application of geometric expansion data operations. After doubling the root number, decimal places are avoided.
Poj 2826 an easy problem ?! (Recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2826
Q: How much rain can two straight lines form a graph. Easy problem is not simple. Consider all the situations. You don't want to check whether discuss can communicate with each other. (I can't do it myself) remind me that water falls vertically from the sky.
Poj 1039 Pipe
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1039
It is also the judgment of the intersection of a line segment and a straight line, plus the idea of enumeration.
Poj 3449 geometric shapes
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3449
Determines whether the ry is intersecting, but the input and output are disgusting.
In addition, there is a knowledge point, that is, to give the vertex on the two diagonal lines of a square (the edge is not parallel to the axis). You need to find the other two points. You must master the methods.
Poj 1584 a round peg in a ground hole
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1584
Knowledge Point: Point to straight line distance, circle and polygon intersection, polygon is convex
Poj 2074 line of sight (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2074
The key to solving the line-of-sight problem is to find the linear equation after two points and the intersection of the line and line segments. The data has a trick, so be careful.
II. Convex Hull
Poj 1113 Wall
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1113
Knowledge Point: naked convex bag problem, convex bag perimeter plus circumference.
Poj 2007 scrambled Polygon
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2007
Knowledge Point: convex hull, output by polar order
Poj 1873 the fortified forest (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1873
World final question, first find the convex bag, and then search. Given the small scale, bitwise enumeration can be used.
See: http://hi.baidu.com/novosbirsk/blog/item/333abd54c7f22c52574e0067.html
Poj 1228 Grandpa's estate (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1228
When finding the number of convex hull vertices, many people will find the convex hull template more points. Although the correct answer can be obtained when finding the area, there will be problems in this question. In addition, we must correctly understand the nature of the convex hull.
Poj 3348 cows
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3348
Convex Hull area calculation
3. Area and Formula
Poj 1654 Area
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1654
Knowledge Point: Use a directed area (Cross Product) to calculate the Polygon Area
Poj 1265 Area
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1265
Poj 2954 triangle
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2954
The application of the pick formula, the relationship between polygon and the whole point. (There is a GCD relationship)
4. Semi-plane intersection
The main application of the semi-plane intersection is to determine whether a polygon has a core. It can also solve some problems related to the feasible regions of the linear equations (that is, those in high school ).
Poj 3335 rotating scoreboard
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3335
Poj 3130 how I mathematician wonder what you are!
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3130
Poj 1474 video surveillance
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1474
Knowledge Point: returns the core of a polygon on a semi-plane and determines the existence of a polygon.
Poj 1279 Art Gallery
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1279
Returns the core of a polygon and the area of the core.
Poj 3525 most distant point from the sea (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3525
Returns a polygon, finding a point in it, which is the farthest from the boundary of the polygon, that is, the largest radius circle in the polygon.
You can use semi-plane intersection + bipartite solution. The distance is two points, and the side approaches inward until the precision is reached.
Poj 3384 feng shui (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3384
In the actual application of the semi-plane intersection, we use two circles to overwrite a polygon and ask at most the area that can cover the polygon.
Solution: Use the semi-plane intersection to push each side of the polygon to the "inner" to get a new polygon and then calculate the farthest two points of the polygon.
Poj 1755 Triathlon (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1755
The semi-plane intersection determines whether the inequality has a solution. Pay attention to the choice of positive and negative signs during the transformation, which directly affects the direction of the semi-plane intersection.
Poj 2540 hotter colder
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2540
The semi-plane intersection is used to calculate the area of the feasible area of linear planning.
Poj 2451 uyuw's concert
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2451
NLP is designed for his nlogn algorithm to solve the problem of semi-plane traffic.
5. In fact, the key to solving the problem is other problems (data structure, combined mathematics, or enumeration)
Several Typical discretization + scanning questions are required by ACM players
Poj 1151 Atlanta (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1151
Poj 1389 area of simple polygons
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1389
Rectangular discretization, line segment tree processing, rectangular area Intersection
Poj 1177 picture (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1177
Rectangle discretization, line segment tree processing, and the perimeter of the rectangle intersection. The data in this topic is relatively strong. The line segment tree must be efficient.
Poj 3565 ants (recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3565
The adjustment idea in computational ry is a bit like sorting. The intersection of line segments is used.
See: http://hi.baidu.com/novosbirsk/blog/item/fb668cf0f362bec47931aae2.html
Poj 3695 rectangles
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3695
It is also the area of the rectangle, but because it is used for multiple queries, and there are not many rectangles, it is most suitable to solve the problem by using the Exclusion Principle in combination mathematics. A line segment tree is a general method, but there are other feasible methods besides a line segment tree.
Poj 2002 squares
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2002
Enumeration Method: calculates the maximum number of squares and hash points on a plane.
Poj 1434 fill the cisterns! (Recommended)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1434
As soon as it starts to faint, prepare a line segment tree. It is actually a simple binary.
Sat. Random Algorithm
What about poj 2420 a star not a tree?
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2420
Polygon. A Fermat point is a point P in a polygon. The sum of the distance between the point and other points is the shortest. The polygon above the Quadrilateral does not have a formula for finding the Fermat point. Therefore, you can use the Randomization Variable Step greedy method.
See: http://hi.baidu.com/novosbirsk/blog/item/75983f138499f825dd54019b.html
7. Resolution ry
I am not good at this kind of question, so I do not do much, the template is very important. Of course, it is useful to skillfully use the cross product and dot product.
Poj 1375 intervals
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1375
Knowledge Point: returns the tangent of a point outside the circle to the circle.
Poj 1329 circle through three points
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1329
Round of Triangle
Poj 2354 Titanic
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2354
Calculate the distance between two points on the sphere, and give the geographical latitude and longitude coordinates.
Poj 1106 Transmitters
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1106
The angle sorting function uses the atan function to determine the angle of the slope.
Poj 1673 exocenter of a triangle
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1673
It can be converted to the center of the triangle.
8. Rotating jamming case
Poj 2187 beauty contest
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 2187
Calculate the farthest point of a convex hull. You can use brute-force enumeration or a rotating card shell.
Poj 3608 bridge communications SS islands (hard)
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3608
The closest distance between two convex packets. My card shell is always wa. Depressed.
9. Other problems
Poj 1981 circle and points
Http://acm.pku.edu.cn/JudgeOnline/problem? Id = 1981
How many points on the plane can be overwritten by the Unit Circle
I. Basic Questions
1.1 fixed algorithm problems
A. Recent Issues
The nearest point problem algorithm is based on the scanning line algorithm.
Zoj 2107 quoit design typical recent point problem
Poj 3714 raid variant recent point-to-point problem
B. Minimum surround circle
The algorithm for the smallest circle surrounded is an incremental algorithm, which is expected to be O (n ).
Zoj 1450 minimal circle
HDU 3007 buried memory
C. Rotating jamming case
Poj 3608 Bridge half SS islands rotating jamming case solution minimum distance between two convex hull
Poj 2079 triangle rotating jamming case calculation of the maximum triangle of a point set in a plane
1.2 simple questions
HDU 3264 open-air shopping Mols, circular area intersection problem, it is not difficult to use the bipartite Method
CII 3000 tree-lined streets, geometric + greedy
CII 4676 geometry problem, template question
HDU 3272 mission impossible, enumeration + mirror reflection
Poj 3334 connected gheeves, two answers, area determination
Poj 1819 disks, simulate
CII 3905 meteor, which seems to be relatively simple
Zoj 2589 circles, Euler's theorem of the plot, and the intersection of circles
Poj 2194 stacking cylinders, vector rotation
II. Classic Algorithms
2.1 triangle partitioning
Triangle partitioning seems to have become popular last year. During the college League, a U has been out twice in a row. In fact, it is a common algorithm to divide a Polygon into triangles. Because a triangle is a simple convex polygon, it is easier to find a public area for two triangles, this is also the most common use of triangle partitioning. By extending this algorithm, we can calculate the area intersection of two simple polygon. It is mainly to understand the concept of directed area.
The first type is the intersection of a circle and a triangle. The main practice is to analyze the situation.
Poj 3675 telegion triangle division, intersection of circles and triangles
Poj 2986 a triangle and a circle triangle division, intersection of circles and triangles
Zoj 2675 little mammoth triangle division, intersection of circles and triangles
The second type is the intersection of a polygon and a polygon.
HDU 3060 area2 simple polygon area and triangular
Another variant of triangle partitioning is trapezoid partitioning, which has some limitations in application, but is easier to write than triangle partitioning.
Poj 3148 ASCII art polygon trapezoid division, semi-plane intersection
The center of gravity of a polygon is also an application of triangle partitioning:
CII 4426 blast the enemy!
2.2 polar sorting
As the name implies, polar order is generally a problem of the center of the circle. The points on the plane are sorted by the Polar Angle of the center of the circle. Then we can solve some statistical problems in linear scanning. However, this type of problem is a little beyond the computational geometric scope.
The following is a classic issue about the statistics of the extremely ordered type of ultraviolet A 11696 beacons. I remember an article by darkgt mentioned this topic.
CII 4064 magnetic train tracks, the statistical problem of polar order, and the theory of population set.
Ultraviolet A 11704 caper pizza
Poj 2280 amphiphilic carbon molecules, the polar order cleverly solves this problem.
2.3 scanning line algorithm
The scanning line algorithm needs to be assisted by the balance tree, which is complicated to write (for this dish ). For the balancing tree, I suggest using the STL set or map directly. Therefore, you need to have some C ++ knowledge to understand a piece of code that uses map and set. I had a hard time learning oi code. However, it is easier to understand the concept of "event points.
HDU 3124 moonmist binary + scanning line. There is no method to adapt the closest point to the nearest circle. However, at that time, the data was weak, and many people had messed up.
Poj 2927 coneology Balance Tree + Scan Line, similar to the above question.
The following two questions are about the polygon scanning line algorithm, and about how many layers of convex polygon are nested on the plane.
CII 4125 painter: this is a final question. It is relatively simple. It is used to determine the number of layers nested in a triangle.
The question above is a triangle, and the question is a polygon, which is a little difficult. But it should be okay to understand the scanning line algorithm.
2.4 Other questions
Poj 3528 ultimate weapon, a templated three-dimensional convex hull. Knowing the concept of three-dimensional directed volume makes it easier to understand the algorithm of three-dimensional convex hull. The 3D convex hull algorithm is also an incremental algorithm.
3. Uncertain algorithm/Extreme Value Problems
Poj 3301 Texas trip is a simulated annealing problem for extreme values. It finds the best answer through plane rotation.
Spoj 4409 circle vs triangle (area1), also simulated annealing
Obtain the maximum value by using the three-point extreme value method.
4. Traditional ry and formula questions
A comrade named Shahriar Manzoor liked these questions and liked them to study a book named modern European geometry. However, these questions can be solved by Middle School geometric knowledge.
CII 4413 triangle hazard, menielos theorem, unexpected scnu match
Ultraviolet 11524 incricle, triangle incircle and Helen Formula
CII 4714 in-circles again, or formula derivation
Poj 2208 pyramids, Euler's four-dimensional Formula
5. Geometric integration with other algorithms
HDU 2297 run, Baidu cup question, uses the semi-plane intersection of the Polar Angle sorting idea.
CII 4448 conducting it packing: ask if a large circle can put down four small circles. An abnormal final question is based on algorithms. It is the second answer. It enumerates two known circles, calculates the third circle that is public-tangent to the known two circles, and enumerates the place where it is placed ...... The key is hard to think about.
CII 4510 slalom ry + Shortest Path
From fractal bacterium, the most troublesome problem is vector rotation.
HDU 3228 island explorer utilizes the properties of the minimal spanning tree.
CII 4499 camera in the museum, a good question about circular processing.
CII 2395 application of jacquard circuits and pick Formulas
Poj 3747 scout yyf II is a geometric problem and needs to be guessed.
Poj 3336 ACM underground, geometric preprocessing, and query Sets
CII 4428 solar eclipse is also a good question, involving circle issues
CII 4206 magic rings and dancing links solve repeated coverage problems. Baidu cup also has a similar problem.
Poj 1263 reflections, and the following topic is a class of optical reflection on the sphere. The solution is to resolve ry, parameter equations, vector rotation, and so on.
CII 4161 spherical mirrors, the three-dimensional version of the above question.
Poj 3521 geometric map, complex preprocessing, can be used for self-abuse
Although the CII 3270 simplified GSM network has a V-map model, it is small in size, so you do not need to dispatch the V-MAP algorithm and use semi-plane intersection. For more information about the metamorphosis-Level V-chart algorithm, consult the Three-fresh tutorial.
CII 4617 simple polygon has a heap of points on the plane, asking you to use a stroke to connect these points into a closed simple polygon, and the line cannot overlap. Modify the convex packet algorithm.
Of course, in addition to the above questions, there are also many wonderful computational geometric questions to be explored.