5 1 2 1 2 1
3 One way to achieve the objective in three operations is shown below. The objective cannot be achieved in less than three operations. * Do Operation $1$ and choose $k=2,c=(1,2)$. Now we have $x=(1,2,0,0,0)$. * Do Operation $1$ and choose $k=3,c=(0,0,1)$. Now we have $x=(1,2,1,0,0)$. * Do Operation $2$ and choose $k=2,c=(2,1)$. Now we have $x=(1,2,1,2,1)$.
5 2 1 2 1 2
2
15 541962451 761940280 182215520 378290929 211514670 802103642 28942109 641621418 380343684 526398645 81993818 14709769 139483158 444795625 40343083
7
{
"problem": {
"name": "Prefix Suffix Addition",
"description": {
"content": "Snuke has a sequence of $N$ integers $x_1,x_2,\\cdots,x_N$. Initially, all the elements are $0$. He can do the following two kinds of operations any number of times in any order: * Operation $1$: ch",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "agc040_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Snuke has a sequence of $N$ integers $x_1,x_2,\\cdots,x_N$. Initially, all the elements are $0$.\nHe can do the following two kinds of operations any number of times in any order:\n\n* Operation $1$: ch...",
"is_translate": false,
"language": "English"
}
]
}