Function to pre - compute the states dp [ 0 ] [ 0 ] , dp [ 0 ] [ 1 ] , . . , dp [ 0 ] [ C_MAX ]
def preCompute ( w , n ) : NEW_LINE INDENT for i in range ( C_MAX , - 1 , - 1 ) : NEW_LINE INDENT findMax ( 0 , i , w , n ) ; NEW_LINE DEDENT DEDENT