Rosetta Problems

Counting of Subarrays

https://atcoder.jp/contests/agc037/tasks/agc037_f