topic
Topic Portal: 1477: [Blue Bridge Cup 2019 preliminary round] shortest
Thinking
See the map, is not all of a sudden wanted to go there two classical shortest path algorithm.
but! To think such a big picture, he was not any help you input, thus solving test the code but has become more complicated, more waste of time.
This is observed when the view from A - S, apparently S - J - B - A clear shortest direct input to the weight.
answer
Shortest Distance: 6