2 1 1 1 0 1 1 0
2.5000000000 Here is one optimal way to complete the trip. * Go the distance $1$ from the origin to chest $1$ at a speed of $1$, taking a time of $1$. * Go the distance $1$ from chest $1$ to town $1$ at a speed of $2$, taking a time of $0.5$. * Go the distance $1$ from town $1$ to town $2$ at a speed of $2$, taking a time of $0.5$. * Go the distance $1$ from town $2$ to the origin at a speed of $2$, taking a time of $0.5$.
2 1 1 1 0 1 100 0
3.4142135624 Here is one optimal way to complete the trip. * Go the distance $1.41\ldots$ from the origin to town $1$ at a speed of $1$, taking a time of $1.41\ldots$. * Go the distance $1$ from town $1$ to town $2$ at a speed of $1$, taking a time of $1$. * Go the distance $1$ from town $2$ to the origin at a speed of $1$, taking a time of $1$.
1 2 4 4 1 0 0 1
4.3713203436 Here is one optimal way to complete the trip. * Go the distance $1$ from the origin to chest $1$ at a speed of $1$, taking a time of $1$. * Go the distance $1.41\ldots$ from chest $1$ to chest $2$ at a speed of $2$, taking a time of $0.707\ldots$. * Go the distance $5$ from chest $2$ to town $1$ at a speed of $4$, taking a time of $1.25$. * Go the distance $5.65\ldots$ from town $1$ to the origin at a speed of $4$, taking a time of $1.41\ldots$.
{
"problem": {
"name": "Booster",
"description": {
"content": "In a two-dimensional plane, there are $N$ towns and $M$ chests. Town $i$ is at the coordinates $(X_i,Y_i)$, and chest $i$ is at the coordinates $(P_i,Q_i)$. Takahashi will go on a trip where he starts",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc274_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "In a two-dimensional plane, there are $N$ towns and $M$ chests. Town $i$ is at the coordinates $(X_i,Y_i)$, and chest $i$ is at the coordinates $(P_i,Q_i)$.\nTakahashi will go on a trip where he starts...",
"is_translate": false,
"language": "English"
}
]
}