add another dp solution to Ex4