cheapest-cookies-2MISC 未解决

分数: 0 金币: 0
题目作者: 未知
一  血: 暂无
一血奖励: 0金币
解  决: 0
提  示:
描  述:

Now that Andrew knows which Costco has the cheapest cookies, he has to get there - as quickly as possible! He has given you 40 roads with the two endpoint locations and the distance of the road, and he starts at location 0 and the Costco is at location 20. All roads are 2-way roads, meaning you can go from x to y and from y to x. Please output the minimum distance needed to reach the Costco, and if there is no possible path, print -1. You will need to pass fifty tests to get the flag. And don't forget to be fast!

Sample Input:

  0 20 18
  4 8 2
  0 4 8
  4 20 6

Sample Output:

  14

WriteUp

暂无相关WriteUp

评分(0)

暂无评分

解题动态

暂无用户攻破该题