Computer Virus
There are $N$ computer screens in a line from left to right. The $i^{th}$ screen from left displays number $i (1 \le i \le N) $. Now these computer screens are divided into $m$ groups. You are given $d_1,d_2,d_3....d_m (1 \le d_1 \le d_2 \le d_3... \le d_m$ and $\sum_{i=1}^{m} d_i = N)$. This means that $1^{st}$ group contains screens displaying numbers from $1$ to $d_1$, $2^{nd}$ group contains n
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