What's wrong with my code?

Правка en1, от dv.jakhar_, 2021-06-30 07:44:02

Hello codeforces, I was solving EXPEDI Spoj problem and my solution is here. Can someone tell me why it's giving me wrong answer. It's working on sample test cases and I think there's some edge case I'm missing. Thanks much :)

My Idea: Firstly I'm sorting all the stops based on their distance from starting point (max from town). Then I'm using a max heap to storing all the possible fuels I can use in the way. While I can't reach the next stop with current fuel I'm using the maximum fuel stored from the max heap (top element). Please take a look at submission link for more understanding.

Теги #help, #wronganswer

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский dv.jakhar_ 2021-06-30 07:44:02 695 Initial revision (published)