How to solve?

Правка ru1, от Verstand, 2018-05-24 18:31:07

As we known, there are N! permutations of {1,2,...N}. Now you are requested to find how many permutations satisfying that, the difference of every two adjacent numbers is not more than K. Because the answer may be quite large, you only need to output the answer module (%) 1,000,000,007. You can assume 2 <= N <= 50 and 0 <= K <= 4.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
ru1 Русский Verstand 2018-05-24 18:31:07 348 Первая редакция (опубликовано)