Page 1 of 1

11126 - Relaxed Golf

Posted: Mon Oct 16, 2006 8:09 pm
by luishhh
Few people have solved this problem. I am using only backtracking with memoization, could it be enough? I keep getting WA, time: 3.3 seconds. This time would be the best in the ranklist, that's why I hesitate if my implementation has a bug or my entire approach to the problem is non-sense.

Posted: Mon Oct 16, 2006 8:53 pm
by sunny
i am trying 2 do it with the same approach but having problem with the memory.

if i use 13*5*5*5*5*5*5*5*17 memory it's RE.
but i believe my program is fine for memory of 13*6*6*6*6*6*6*6*18.
but gets MLE.

Posted: Mon Oct 16, 2006 9:10 pm
by little joey
I think that during the contest the memory limit was 64MB, so a 6^6*13*17 array of char could be used. But now the limit is only 32 MB. However you can store one dimension in six bits of the char, so a 6^5*13*17 array of char is enough (the last dimension can be 17, because you always put the first card on the discard pile).

Posted: Tue Oct 17, 2006 7:59 am
by sunny
got AC.

Posted: Tue Oct 17, 2006 9:46 am
by sclo
I keep getting TLE, I think that the time limit might be too tight for this problem.
I see that they've finally increased the memory limit, although I have already derived ways to do it with less than 17MB