15 10 + 5 + 2 + 3 - 2 + 5 + 10 - 3 + 1 + 3 + 3 - 5 + 1 + 7 + 4 - 3
0 0 1 0 1 2 2 2 2 2 1 3 5 8 5 This input contains $15$ operations. After the last operation, the box contains the balls $(5,10,1,3,1,7,4)$. There are five ways to pick up balls for a sum of $10$: * $5+1+3+1$ (the $1$\-st, $3$\-rd, $4$\-th, $5$\-th balls) * $5+1+4$ (the $1$\-st, $3$\-rd, $7$\-th balls) * $5+1+4$ (the $1$\-st, $5$\-th, $7$\-th balls) * $10$ (the $2$\-nd ball) * $3+7$ (the $4$\-th, $6$\-th balls)
{
"problem": {
"name": "#(subset sum = K) with Add and Erase",
"description": {
"content": "We have a box, which is initially empty. Let us perform a total of $Q$ operations of the following two types in the order they are given in the input. \\+ $x$ Type $1$: Put into the box a ball with",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc321_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have a box, which is initially empty. \nLet us perform a total of $Q$ operations of the following two types in the order they are given in the input.\n\n\\+ $x$\n\nType $1$: Put into the box a ball with...",
"is_translate": false,
"language": "English"
}
]
}