Company: Walmart sparkplug
Difficulty: medium
Clash of Cities Problem Statement In the game "Clash of Cities," John aims to conquer cities numbered from 0 to N-1, starting from city I. The goal is to determine the minimum distance John must cover to conquer every city. After each conquest, John must return to his initial city to regroup. However, it's possible that not all cities can be conquered or that some cities are unreachable. Total cities N, initial city I, and the total number of paths M. Each path specifies the starting city, destination city, and the distance between them. The minimum total distance John needs to cover to conquer every city, or -1 if it's not possible. Input Format The first line contains three integers where N is the total number of cities, I is the city that John holds and M is the total ways between cities. The next M lines contains X,Y,D where X, Y denotes there is a way between X and Y with distance D. Output Format Display single integer minimum total distance John has to cover if he is able to con