# TC FairTournament

## Summary

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

From TopCoder Single Round Match 344.