3 48 3 20 -4 2 1 5
5 From the initial state where your magic power is $0$ and the monster's health is $48$, consider using moves as follows. * Use move $2$. Now, your magic power is $4$, and the monster's health is $46$. * Use move $3$. Now, your magic power is $3$, and the monster's health is $41$. * Use move $1$. Now, your magic power is $0$, and the monster's health is $21$. * Use move $2$. Now, your magic power is $4$, and the monster's health is $19$. * Use move $1$. Now, your magic power is $1$, and the monster's health is $-1$. Here, you use moves five times before the monster's health is not greater than $0$, which is the minimum possible number.
20 583988303060450752 -64 273760634 -238 960719353 -114 191410838 -250 357733867 232 304621362 -286 644706927 210 37849132 -230 556412112 -142 136397527 101 380675202 -140 152300688 190 442931589 -187 940659077 -12 312523039 32 126515475 -143 979861204 105 488280613 240 664922712 290 732741849 69 541282303
595990842
{
"problem": {
"name": "Ex - Negative Cost",
"description": {
"content": "A monster with health $H$ has appeared right in front of you. Your magic power is now $0$. You can use $N$ moves called move $1$, move $2$, $\\ldots$, move $N$, any number of times in any order. For ea",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 3000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc310_h"
},
"statements": [
{
"statement_type": "Markdown",
"content": "A monster with health $H$ has appeared right in front of you. Your magic power is now $0$.\nYou can use $N$ moves called move $1$, move $2$, $\\ldots$, move $N$, any number of times in any order.\nFor ea...",
"is_translate": false,
"language": "English"
}
]
}