Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polygon Relationship #530

Open
rajatjha28 opened this issue Oct 22, 2021 · 1 comment
Open

Polygon Relationship #530

rajatjha28 opened this issue Oct 22, 2021 · 1 comment

Comments

@rajatjha28
Copy link

Enter your question -

You are given a strictly convex polygon with N
vertices (numbered 1
through N
). For each valid i
, the coordinates of the i
-th vertex are (Xi,Yi)
. You may perform the following operation any number of times (including zero):

Consider a parent polygon. Initially, this is the polygon you are given.
Draw one of its child polygons ― a simple non-degenerate polygon such that each of its sides is a chord of the parent polygon (it cannot be a side of the parent polygon). The operation cannot be performed if the parent polygon does not have any child polygons.
The child polygon which you drew becomes the new parent polygon.
Your goal is to draw as many sides of polygons in total as possible (including the polygon given at the start). Find this maximum total number of sides

Enter link to the question(if question belongs to any online platform) -

https://www.codechef.com/problems/POLYREL

Tags for the question(eg - Array, Basic, Stack, etc.) -

Greedy, Geometry

@rajatjha28
Copy link
Author

Please assign this to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant