Function to get the minimum product of subsequence such that adjacent elements are separated by a max distance of K
def minimumProductSubsequence ( arr , n , k ) : NEW_LINE INDENT s = [ ] NEW_LINE dp = [ 0 for i in range ( MAX ) ] ; NEW_LINE p = [ 0.0 for i in range ( MAX ) ] ; NEW_LINE dp [ 0 ] = arr [ 0 ] ; NEW_LINE p [ 0 ] = math . log ( arr [ 0 ] ) ; NEW_LINE DEDENT