dfs, divide and conquer, tree, hard idea

Level D