1 3 2 10 1 2 7 2 3 9 2 2 2
146 If you start with $146$ yen, you can go from airport $1$ to airport $3$: 1. Take route $1$ to go from airport $1$ to airport $2$. You now have $146-70=76$ yen, and get $7$ miles. 2. At airport $2$, exchange $7$ miles for $14$ yen. You now have $76+14=90$ yen. 3. Take route $2$ to go from airport $2$ to airport $3$. You now have $90-90=0$ yen, and get $9$ miles. If you start with less than $146$ yen, you cannot go to airport $3$.
1 4 4 10 1 2 7 2 4 9 2 3 1 3 2 1 2 2 9 2
106 If you start with $106$ yen, you can go from airport $1$ to airport $4$: 1. Take route $1$ to go from airport $1$ to airport $2$. You now have $106-70=36$ yen, and get $7$ miles. 2. Take route $3$ to go from airport $2$ to airport $3$. You now have $36-10=26$ yen, and get $1$ mile. 3. At airport $3$, exchange $8$ miles for $72$ yen. You now have $26+72=98$ yen. 4. Take route $4$ to go from airport $3$ to airport $2$. You now have $98-10=88$ yen, and get $1$ mile. 5. At airport $2$, exchange $1$ mile for $2$ yen. You now have $88+2=90$ yen. 6. Take route $2$ to go from airport $2$ to airport $4$. You now have $90-90=0$ yen, and get $9$ miles. If you start with less than $106$ yen, you cannot go to airport $4$.
1 7 8 100 3 2 81 3 4 42 1 6 97 4 5 42 4 1 59 6 3 34 5 3 68 2 7 47 0 58 37 10 89 16 0
16354.2758620689655172413793103448275862068965
{
"problem": {
"name": "Flights 2",
"description": {
"content": "Japan has $N$ airports numbered $1, 2, \\dots, N$. AtCoder Airlines operates $M$ directed flight routes in Japan, numbered $1, 2, \\dots, M$. Route $j$ goes from airport $A_j$ to airport $B_j$ and costs",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "agc072_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Japan has $N$ airports numbered $1, 2, \\dots, N$. AtCoder Airlines operates $M$ directed flight routes in Japan, numbered $1, 2, \\dots, M$. Route $j$ goes from airport $A_j$ to airport $B_j$ and costs...",
"is_translate": false,
"language": "English"
}
]
}