You are given an integer n representing n. You are also given a roads where roads[i] =
Additionally, you are given an integer array appleCost of length n, where appleCost[i] is the cost of purchasing an apple in city k.
Starting from city
The sum of the travel costs of the roads used to travel from city
The cost of purchasing the apple at city appleCost[j - 1].
The sum of the travel costs of the roads used to return from city k.
Return an integer array of size n where the
Constraints:
n
roads.length
roads[i].length
n
appleCost.length n
appleCost[i]
k
There are no repeated edges.
You are given an integer n representing n. You are also given a roads where roads[i] =
Additionally, you are given an integer array appleCost of length n, where appleCost[i] is the cost of purchasing an apple in city k.
Starting from city
The sum of the travel costs of the roads used to travel from city
The cost of purchasing the apple at city appleCost[j - 1].
The sum of the travel costs of the roads used to return from city k.
Return an integer array of size n where the
Constraints:
n
roads.length
roads[i].length
n
appleCost.length n
appleCost[i]
k
There are no repeated edges.