dynamic programming solution for max continuous sum added