Get stuck in Polygons Intersection

Правка en1, от nhphuc, 2024-11-28 16:42:03

Today I was try to solve this problem: https://codeforces.me/gym/100952/problem/J.

My main idea is:

  • Find all point $$$X$$$s that $$$X$$$s is a node of $$$A$$$ and in $$$B$$$'s area.

  • Find all point $$$X$$$s that $$$X$$$s is a node of $$$B$$$ and in $$$A$$$'s area.

  • Find all intersection points of $$$A$$$ and $$$B$$$.

Let call the set of points we found is $$$S$$$, $$$S$$$ will be a convex hull, find the area of $$$S$$$ — the answer of problem.

But somehow I get WA verdict, can anyone help me to find out why, thanks all.

(This is my code: https://ideone.com/8wXu6a.)

Теги geometry, convexhull

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский nhphuc 2024-11-28 18:16:58 170
en3 Английский nhphuc 2024-11-28 16:55:24 1 Tiny change: 'com/8wXu6a.)' -> 'com/8wXu6a)'
en2 Английский nhphuc 2024-11-28 16:42:25 2
en1 Английский nhphuc 2024-11-28 16:42:03 585 Initial revision (published)