This function returns true if the value cumulative according to received integer K is less than budget B , otherwise returns false
def canBeOptimalValue ( K : int , arr : list , N : int , B : int ) -> bool : NEW_LINE INDENT global value NEW_LINE DEDENT