Codeforces Round #156 (Div. 2) C. Almost Arithmetical Progression dp
Gena loves sequences of numbers. Recently, he has discovered a new type of sequences which he called an almost arithmetical progression. A sequence is an almost arithmetical progression, if its elemen...