Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years. ×

Help in the bipartite Dp problem from atcoder

Revision en1, by vipin_bhardwaj, 2019-06-20 18:52:46

Given a sequence (1, 2, 3, ... N) and an integer k. You need to find all the permutations of the sequence such that for any i in the permutation |a_i — i| != k

N <= 2000 and k < n

from the given editorial i am not able to understand how to find Mk using DP.
Can someone please help. Thank you

Tags #permutation, #dp, biparite matching

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English vipin_bhardwaj 2019-06-20 18:53:37 68
en1 English vipin_bhardwaj 2019-06-20 18:52:46 405 Initial revision (published)