← All problemsSign in

Random Convex Hull

CodeChefRating 3281Open on judge ↗

You are given two increasing arrays of $N$ integers $x_1 \lt x_2 \lt \ldots \lt x_N$ and $y_1 \lt y_2 \lt \ldots \lt y_N$. For a permutation $\sigma_1,\sigma_2,\ldots,\sigma_N$ of integers $1,2,\ldots,N$, let's define $A(\sigma)$ in the following way: - Consider the points $(x_1, y_{\sigma_1}), (x_2, y_{\sigma_2}), \ldots, (x_N, y_{\sigma_N})$. Then $A(\sigma)$ equals to the area of the convex h

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start