Respected Sir/Madam, In the problem www.spoj.pl/problems/AMR11A I have used the following recursion : Definitions : S[i][j]=>stores the maximum minimized value that the sum attains starting from i,j and ending at R-1,C-1 ; a(i)(j)=>(i,j) th element of given array
I applied the following recursion: m=max(S(i,j+1),S(i+1,j)) if(m<0) S(i,j)=a(i,j)+m ; else S(i,j)=a(i,j); Finally if S(0,0) <=0 i am returning |S(0,0)|+1 else i am returning 1 ; I am getting WA after my submission Please , point out the error . For my code:ref.=http://ideone.com/EK5SC Thanking you , rpf -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/oibyUihUOhoJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.