I can only print the path without using memoization.
However, with memoization, some DFS will return midway when it finds the table already filled for next point. So we need another path_table to store the temporary paths from each point.
Then with the standard solution, the max() operation removed the path info, so that part needs rewriting as well.
Anyone can come up with path-printing algorithm that would pass OJ with the printf disabled?