Rosetta Problems

Count Arithmetic Subsequences

https://atcoder.jp/contests/abc362/tasks/abc362_e