API Response (JSON)
{
"problem": {
"name": "D. Almost Identity Permutations",
"description": {
"content": "A permutation _p_ of size _n_ is an array such that every integer from 1 to _n_ occurs exactly once in this array. Let's call a permutation an _almost identity permutation_ iff there exist at least _",
"description_type": "Markdown"
},
"platform": "Codeforces",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "CF888D"
},
"statements": [
{
"statement_type": "Markdown",
"content": "A permutation _p_ of size _n_ is an array such that every integer from 1 to _n_ occurs exactly once in this array.\n\nLet's call a permutation an _almost identity permutation_ iff there exist at least _...",
"is_translate": false,
"language": "English"
},
{
"statement_type": "Markdown",
"content": "一个大小为 $n$ 的排列 $p$ 是一个数组,其中从 $1$ 到 $n$ 的每个整数恰好出现一次。\n\n我们称一个排列为 _几乎恒等排列_,当且仅当至少有 $n - k$ 个下标 $i$($1 ≤ i ≤ n$)满足 $p_i = i$。\n\n你的任务是计算给定数字 $n$ 和 $k$ 的 _几乎恒等排列_ 的数量。\n\n第一行包含两个整数 $n$ 和 $k$($4 ≤ n ≤ 1000$,$1 ≤ ...",
"is_translate": true,
"language": "Chinese"
},
{
"statement_type": "Markdown",
"content": "Let $ n, k \\in \\mathbb{N} $ with $ 4 \\leq n \\leq 1000 $, $ 1 \\leq k \\leq 4 $.\n\nLet $ S_n $ denote the symmetric group on $ n $ elements, i.e., the set of all permutations of $ \\{1, 2, \\dots, n\\} $.\n\nA...",
"is_translate": false,
"language": "Formal"
}
]
}