not dynamic programming formula scheme,not good