TC CsCourses

CsCourses

 * http://www.topcoder.com/stat?c=problem_statement&pm=7505

Summary
A relatively straightforward dynamic programming problem with backtracking. A little thinking gets the time down to $$O(n^4)$$ which is enough for $$n=50$$.

From TopCoder Single Round Match 340, Division 1, Level 2 (500 points).