dp, trees