TC FairTournament


 * http://www.topcoder.com/stat?c=problem_statement&pm=7332

Summary
Given integers n and k, determine the number of permutations $$\sigma$$ of the numbers $${1, 2, \ldots, n}$$ with $$|\sigma(i)-i| \leq k,$$ for all $$1 \leq i \leq n.$$

From TopCoder Single Round Match 344.