文章目录
Input:
Output:
Problem Description
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],......
阅读全文