Mudit and Sequences
CodeChefOpen on judge ↗
Mudit is interested in sequences. He also has preferences for numbers. He thinks n integers a1, a2, ..., an are special. Now he is interested in special sequences. A sequence x(1), x(2), ..., x(k) is called special if it satisfies the following three conditions: -- The sequence is strictly increasing, that is x(i) < x(i+1) for each i (1 <= i <= k-1). -- No two adjacent elements are co-pri
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