solved - a gread dp problem !