← All problemsSign in

1 - Make a convex polygon

Let's say that two nonzero vectors $\overrightarrow{v_1}=(x_1, y_1)$ and $\overrightarrow{v_2}=(x_2, y_2)$ have the same direction if there exists a positive constant $k > 0$ such that $\overrightarrow{v_1} = k \cdot \overrightarrow{v_2}$ (i.e., $x_1 = k \cdot x_2$ and $y_1 = k \cdot y_2$). Let's define the origin point $O$ to be $(0, 0)$. You are given $n$ non-zero vectors $\overrightarrow{v_1},

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