C. Journey time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n cities and n - 1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other by t…