 # Wrong answer in this ZIO problem

Hello Guys ,

Today I was solving ZIO 2005 , Q5 and I was getting wrong answer for b and c subtasks and even after verifying many times I am unable to find a fault in this
I will attach the picture of my calculations . Here it is :

I solved this problem by both brute force and dijkstra algorithm and still the answer is coming out to be same
Have i done any mistake in calculating the energy required for each slope or is the answer wrong ?

Someone pls help me with this
Thanks a lot !

1 Like

Hello @sudheerays123,
I also was getting the same answer when i solved it a few weeks ago. I think the answer for these subtask is given wrong in the answers.

1 Like

Hello @sumit_king ,

i got to know my mistake ,

We need not go in the maximum speed which is given , he can go in any speed smaller than or equal to the maximum speed .
Suppose for the b subtask and 8th slope ,
if he goes in 60 speed then energy required is 200 while if he goes in 50 speed then the energy required is 100

We have to be careful from next time

Credit : @shubh2003

2 Likes

Ohh… Yeah got that!!
Thank You @sudheerays123 and @shubh2003 1 Like