4 2 1 20 4 7 20 2 20 3 1 3 5 1 4 6
16 Takahashi will build the following infrastructure. * Pay a cost of $X_1=1$ to build an airport on island $1$. * Pay a cost of $X_3=4$ to build an airport on island $3$. * Pay a cost of $Y_2=2$ to build a harbor on island $2$. * Pay a cost of $Y_4=3$ to build a harbor on island $4$. * Pay a cost of $Z_2=6$ to build a road connecting island $1$ and island $4$. Then, the objective will be achieved at a cost of $16$. There is no way to achieve the objective for a cost of $15$ or less, so $16$ should be printed.
3 1 1 1 1 10 10 10 1 2 100
3 It is not mandatory to build all three types of facilities at least once.
7 8 35 29 36 88 58 15 25 99 7 49 61 67 4 57 2 3 3 2 5 36 2 6 89 1 6 24 5 7 55 1 3 71 3 4 94 5 6 21
160
{
"problem": {
"name": "Transportation",
"description": {
"content": "The Republic of AtCoder has $N$ islands. Initially, none of the islands has an airport or harbor, and there is no road between any two of them. Takahashi, the king, will provide some means of transpor",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 4000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc270_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "The Republic of AtCoder has $N$ islands. Initially, none of the islands has an airport or harbor, and there is no road between any two of them. Takahashi, the king, will provide some means of transpor...",
"is_translate": false,
"language": "English"
}
]
}