← All problemsSign in

Maxim and Progressions

CodeChefRating 2098Open on judge ↗

Maxim likes arithmetic progressions and does not like sequences which are not arithmetic progressions. Now he is interested in the question: how many subsequences of his sequence a, consisting of n elements, are not arithmetic progressions. Sequence s[1],  s[2],  ...,  s[k] is called a subsequence of sequence a[1],  a[2],  ...,  a[n], if there will be such increasing sequence of indices i[1], i[

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start