D. Restricted Permutation

Problem Name:
D. Restricted Permutation
Site:AtCoder
Links:
Tags: