Add a top down solution for the new online judge, which is too slow to pass the large data set.