Deleting numbers
Sereja has an array of n integers a[1], a[2], ..., a[n]. In one move Sereja can do the following operation Assume integers v and t, Where 1 ≤ v, t ≤ n, such that, all the elements of the array a[v], a[v + t], a[v + t * 2], ... a[v + t * k] Where k ≥ 0 are equal. To delete all elements a[v], a[v + t], a[v + t * 2], ... a[v + t * k] from the array. The remaining elements are written in a without
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