1 / 4
May 2024

Try this test case.

3 30
3 4 5
4 6 7
2 3 4
2 3 4
2 1 2
2 3 3

Expected answer is 4 5

hey @simes thanks , I’ve figured out error in my code , i need to start from time t = 0. instead of t=1 and while calculating minimum time once i reached the optimal risk i should only consider the least time.

Hello,
Data Check: Verify input data for accuracy.
Algorithm Logic: Ensure your solution addresses all task requirements.
Test Cases: Run your code against various scenarios.
Edge Cases: Confirm your solution handles extreme values.
Debugging: Step through your code to find issues.
Peer Review: Get input from others familiar with the task.
I hope this will help you
Thank you