Online assessment Question --> How to apply dp to such large constraints

Revision en3, by wronganswer.5, 2023-06-21 10:55:51

This question was asked was in an OA. I was not able to sovle it fully i.e my soln got partially accepted.

Code

I want to solve this problem via memorization as I am not so good at writing bottom-up approach directly.

I took 5 states-> X and Y coordinates of alice and bob and index of the corr(array of position of apples). How to optimize states?

Thanks in advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English wronganswer.5 2023-06-21 10:55:51 110
en2 English wronganswer.5 2023-06-21 10:54:05 98
en1 English wronganswer.5 2023-06-21 10:49:58 1341 Initial revision (published)