A Simple Polygon
CodeChefOpen on judge ↗
You are given a simple (not self-intersecting polygon, without holes) polygon \( P \) with \( N \) vertices. You have to **find 500 pairs of vertices** such that the line segments joining these two points lie completely inside the polygon (i.e. suppose \( AB \) is a segment, then it should be inside the polygon and it shouldn't touch or intersect the polygon at any other point than \( A \) or \( B
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start