Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use dynamic programming to find the path with the max score.
Use another dynamic programming array to count the number of paths with max score.
Solve with full IDE support and test cases