Not sure why getting wrong answer

Revision en2, by supermarine, 2021-03-08 17:33:39

I did this question . Instead of using set to sort dishes. I tried sorting the dishes based on their value and binary search the first compatible value but it seems to be giving an error i am not able to figure out. pls help.

My submission Link

Tags dp, binary search, #educational round

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English supermarine 2021-03-08 17:33:39 17 Tiny change: 'ng set to arrang vertices I tried s' -> 'ng set to sort dishes. I tried s'
en1 English supermarine 2021-03-08 17:33:10 396 Initial revision (published)