5 1 10 4 7 1 1 10 6 7 1 2 12 3 5 7 1 1 2 12 3 5 7 1 2 20 749013197 23809523 46981984 70791437 118235723 132421762 180040807 203849360 251468335 275277857 322889975 346699150 394318091 418113855 465732891 489532137 537144103 558852533 606466719 630275002 677584754 701394209 1 2 2 1 1 2 1 2 1 2 2 1 2 1 2 1 1 2 1 2
2 0 -1 6 585545066743659 Let us explain the first test case. You can reach coordinate $L$ with a cost of $2$ as follows: * Consume $3$ liters of type-$1$ fuel to move from coordinate $0$ to $3$. The remaining type-$1$ fuel is $1$ liter. * Consume $4$ liters of type-$2$ fuel to move from coordinate $3$ to $7$. The remaining type-$2$ fuel is $0$ liters. * Buy $2$ liters of type-$1$ fuel at the fuel station. The remaining type-$1$ fuel is $3$ liters. * Consume $3$ liters of type-$1$ fuel to move from coordinate $7$ to $10$. The remaining type-$1$ fuel is $0$ liters. It is impossible to reach coordinate $L$ with a cost less than $2$. Thus, the answer is $2$.
{
"problem": {
"name": "Fuel",
"description": {
"content": "Solve the following problem for $T$ test cases. You are currently at coordinate $0$ on a number line, and you want to reach coordinate $L$. You will use a car for the movement. This car runs on two ty",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "awtf2024_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Solve the following problem for $T$ test cases.\nYou are currently at coordinate $0$ on a number line, and you want to reach coordinate $L$.\nYou will use a car for the movement. This car runs on two ty...",
"is_translate": false,
"language": "English"
}
]
}