If i is non zero , then k remains unchanged and value is added to sum
else : NEW_LINE INDENT cnt += solve ( idx + 1 , k , newtight , sum + i ) ; NEW_LINE DEDENT dp [ idx ] [ k ] [ tight ] [ sum ] = cnt NEW_LINE