Rosetta Problems

Distinct Elements on Subsegments

https://atcoder.jp/contests/agc059/tasks/agc059_d