I registered recentrly to SPOJ to practice competitive programmation.
I have some trouble solving this problem : https://www.spoj.com/problems/ADV04I1/, and I could use some hints.
The solutions I provided so far seem to be correct, but too slow (in the worst case).
I couldn’t think of a solution without using a recursive building of the possible grids, even with memoïsation.
Thanks in advance for your tips