3 1 1 2
4 The possible sequences $A$ after the operation are as follows: * $A=(1,1,2)$: This can be achieved with $k=1$ and $(i_1)=(1)$. * $A=(1,2,2)$: This can be achieved with $k=2$ and $(i_1,i_2)=(1,2)$. * $A=(1,1,3)$: This can be achieved with $k=2$ and $(i_1,i_2)=(1,3)$. * $A=(1,2,4)$: This can be achieved with $k=3$ and $(i_1,i_2,i_3)=(1,2,3)$.
4 1 -1 1 -1
8
5 0 0 0 0 0
1
40 2 -2 1 3 -3 -1 -2 -3 0 -1 -2 0 -3 0 0 2 0 -1 2 -2 -2 -1 3 -2 -2 -2 2 3 2 -3 0 -2 2 1 3 0 -1 0 -2 -3
420429545
{
"problem": {
"name": "Subsequence and Prefix Sum",
"description": {
"content": "You are given an integer sequence $A=(A_1,A_2,\\cdots,A_N)$ of length $N$. You will perform the following operation exactly once: * Choose a non-empty subsequence of $A$ (not necessarily contiguous)",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc180_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given an integer sequence $A=(A_1,A_2,\\cdots,A_N)$ of length $N$.\nYou will perform the following operation exactly once:\n\n* Choose a non-empty subsequence of $A$ (not necessarily contiguous)...",
"is_translate": false,
"language": "English"
}
]
}