Need Help in DP problem

Revision en1, by Makise_Kurisu, 2020-09-15 13:47:38

Hi, I was trying to solve this problem from a coding test and came up with an O(n^4) solution which goes like first I will precompute the 2-D prefix sums of the entire grid and then for each cell naively Bruteforce for all possible solutions in n^2 operations, It would be great if you can share your insights/solutions for the problem. The contest is over 5 days back you can answer as late as you want until you are assured of this.

PROBLEM STATEMENT

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Makise_Kurisu 2020-09-15 13:47:38 658 Initial revision (published)