Solved the problem again for the new online judge, and found the normal back tracking is not fast enough.