API Response (JSON)
{
"problem": {
"name": "E. Mike and code of a permutation",
"description": {
"content": "Mike has discovered a new way to encode permutations. If he has a permutation _P_ = \\[_p_1, _p_2, ..., _p__n_\\], he will encode it in the following way: Denote by _A_ = \\[_a_1, _a_2, ..., _a__n_\\] a ",
"description_type": "Markdown"
},
"platform": "Codeforces",
"limit": {
"time_limit": 4000,
"memory_limit": 524288
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "CF798E"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Mike has discovered a new way to encode permutations. If he has a permutation _P_ = \\[_p_1, _p_2, ..., _p__n_\\], he will encode it in the following way:\n\nDenote by _A_ = \\[_a_1, _a_2, ..., _a__n_\\] a ...",
"is_translate": false,
"language": "English"
},
{
"statement_type": "Markdown",
"content": "Mike 发现了一种新的排列编码方式。如果他有一个排列 #cf_span[P = [p1, p2, ..., pn]],他会按以下方式编码它:\n\n记 #cf_span[A = [a1, a2, ..., an]] 为一个长度为 #cf_span[n] 的序列,表示该排列的编码。对于每个 #cf_span[i] 从 #cf_span[1] 到 #cf_span[n] 依次处理,他会选择最小的未标记的...",
"is_translate": true,
"language": "Chinese"
},
{
"statement_type": "Markdown",
"content": "**Definitions** \nLet $ n \\in \\mathbb{Z}^+ $ be the length of the permutation. \nLet $ A = (a_1, a_2, \\dots, a_n) $ be the given code, where each $ a_i \\in \\{-1\\} \\cup \\{1, 2, \\dots, n\\} $, and all po...",
"is_translate": false,
"language": "Formal"
}
]
}