Project Euler 107 - Minimal Network

Official link: https://projecteuler.net/problem=107