add solutions to these three simple dp problem