{"code":"cses2229","name":"CSES - Permutation Inversions | Hoán vị nghịch thế","description":"Nhiệm vụ của bạn là đếm số lượng hoán vị của $1, 2, \\dots, n$ có đúng $k$ cặp nghịch thế (tức là cặp hai phần tử ở sai thứ tự).\r\n\r\nVí dụ, với $n = 4$ và $k = 3$, có $6$ hoán vị:\r\n\r\n- $[1,4,3,2]$\r\n- $[2,3,4,1]$\r\n- $[2,4,1,3]$\r\n- $[3,1,4,2]$\r\n- $[3,2,1,4]$\r\n- $[4,1,2,3]$\r\n\r\n## Input\r\n- Dòng đầu vào duy nhất có hai số nguyên $n$ và $k$.\r\n\r\n## Output \r\n- In đáp án chia lấy dư cho $10^9 + 7$.\r\n\r\n## Constraints\r\n- $1 \\le n \\le 500$\r\n- $0 \\le k \\le \\frac{n\\left(n-1\\right)}{2}$\r\n\r\n## Example\r\n\r\n**Sample input**\r\n\r\n```\r\n4 3\r\n```\r\n\r\n**Sample output**\r\n\r\n```\r\n6\r\n```","points":1600.0,"partial":true,"time_limit":1.0,"memory_limit":524288,"short_circuit":false,"allowed_languages":[3,4,34,36,37,5,6,11,12,14,28,2,38,39,9,18,17,29,23,27,35,25,26,10,7,19,32,1,8,15,16,24,20,33,13,41,21,40],"is_public":true,"is_manually_managed":false,"permissions":{"can_edit":false}}