Rosetta Problems

ぬいぐるみの整理 (Plush Toys)

https://atcoder.jp/contests/joi2017yo/tasks/joi2017yo_d