API Response (JSON)
{
"problem": {
"name": "D. New Year and Arbitrary Arrangement",
"description": {
"content": "You are given three integers _k_, _p__a_ and _p__b_. You will construct a sequence with the following algorithm: Initially, start with the empty sequence. Each second, you do the following. With prob",
"description_type": "Markdown"
},
"platform": "Codeforces",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "CF908D"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given three integers _k_, _p__a_ and _p__b_.\n\nYou will construct a sequence with the following algorithm: Initially, start with the empty sequence. Each second, you do the following. With prob...",
"is_translate": false,
"language": "English"
},
{
"statement_type": "Markdown",
"content": "你被给定三个整数 $k$、$pa$ 和 $pb$。\n\n你将使用以下算法构造一个序列:初始时序列为空。每一秒,你执行以下操作:以概率 $pa/(pa+pb)$,在序列末尾添加 '_a_';否则(概率为 $pb/(pa+pb)$),在序列末尾添加 '_b_'。\n\n当你至少获得了 $k$ 个构成 '_ab_' 的子序列时,停止构造。求最终序列中 '_ab_' 作为子序列出现次数的期望值。可以证明,该期望...",
"is_translate": true,
"language": "Chinese"
},
{
"statement_type": "Markdown",
"content": "**Definitions** \nLet $ k, p_a, p_b \\in \\mathbb{Z}^+ $ be given integers. \nLet $ P = \\frac{p_a}{p_a + p_b} $, $ Q = \\frac{p_b}{p_a + p_b} $ be the probabilities of appending 'a' and 'b', respectively...",
"is_translate": false,
"language": "Formal"
}
]
}