Skip to main content

Fence Blueprint

Challenge on lesson: Final 2-A: Fence Blueprint

CHALLENGE
Difficulty: advanced+25 XP

**Problem.** Line 1: n. Then n points. Print the doubled area of their convex hull (an integer; 0 if the hull is degenerate). **Constraints:** 1 <= n <= 200000; coordinates up to 1e6 in absolute value; the doubled area fits in 64 bits. **R versus W.** The graded wrong solution applies the shoelace formula to the INPUT order instead of the hull.

Back to lesson: Final 2-A: Fence Blueprint