Have you encountered this before ?
In this problem I made a dp solution that gets MLE.
Then i added this piece of code.
for (int i = 1 ; i < n ; i++){ depee(i,0); }
Surprisingly, it worked and i got AC.
can you explain what happened?
Full text and comments »