Churu and his Sequence
CodeChefOpen on judge ↗
Given a list of N numbers, say A[1..N]. And a set of integers S. Each A[i] belongs to the set S. Being said that let us first define if a array is ‘good’ or not good. We say a array, Ar[M] of size ‘M’, good if for every pair of index (A[i] !=A[j] and 1 ≤ i, j ≤ M) there exist some index k (1 ≤ k such that at-least one of the following condition hold - Ar[k] = Ar[i] and A[k+1] = Ar[j] - Ar[k] =
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