Path with Maximum Probability

Implement solve for Path with Maximum Probability. Return the required output for the provided arguments.

Examples
Input: [3,[[0,1],[1,2],[0,2]],[0.5,0.5,0.2],0,2]
Output: 0.25
Hints

Path with Maximum Probability

Implement `solve` for **Path with Maximum Probability**. Return the required output for the provided arguments.