Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use a variation of DFS with parameters 'curent_vertex' and 'current_time'.
Update the probability considering to jump to one of the children vertices.
Solve with full IDE support and test cases