Collinear Points
$N$ points are given on the coordinate system such that the coordinates of the $i^{th}$ point are $(X_i,Y_i)$ and $X_i \lt X_{i+1}$ for all $(1\le i \lt N)$. Maintain two types of queries: - Type $1$: You are given $5$ integers in the form: `1 L R K B`. For all $L \le i \le R$, change the coordinates of the $i^{th}$ point to $(X_i, K\cdot X_i+B)$. - Type $2$: You are given $3$ integers in the for
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