Rosetta Problems

Unique Matching

https://atcoder.jp/contests/agc067/tasks/agc067_d