Function advent_solutions::advent2017::day24::part2
[−]
[src]
pub fn part2(graph: &Vec<Component>) -> usize
The bridge you've built isn't long enough; you can't jump the rest of the way.
In the example above, there are two longest bridges:
-
0/2--2/2--2/3--3/4 -
0/2--2/2--2/3--3/5
Of them, the one which uses the 3/5 component is stronger; its
strength is 0+2 + 2+2 + 2+3 + 3+5 = 19.
let input = parse_input("\ 0/2 2/2 2/3 3/4 3/5 0/1 10/1 9/10 "); assert_eq!(part2(&input), 19);
What is the strength of the longest bridge you can make? If you can make multiple bridges of the longest length, pick the strongest one.