def sat(Bars, Children):
    """
    Arguments:
    Bars    -- chocolate bars array
    Children-- children array

    Return:
    f -- flag. f=1 if the problem is satifiable, 0 Otherwise.
    S -- message satisfiable/not satisfiable
    Cp-- if there is an excess amount, create a "ghost" children to take up the excess units
    """

    NB = sum(Bars) #Total number of available chocolate units
    NC = sum(Children) # Total number of requested chocolate units

    Cp= Children #initialize
    ng= len(Children)

    ex= NB-NC #excess units

    if ex == 0:
        S= "The problem is satisfiable"
        f=1

    elif ex > 0:
        Cp = Children+[ex] # ass the "ghost" children if there is an excess supply
        ng= len(Cp) # Lenght of Cp. This is diffrent from -n- if there is a ghost
        S= "The problem is satisfiable"
        f=1

    else :
        S="The problem is not satisfiable" # The problem cannot be satisfied if there is no enough supply
        f=0

    return S, Cp, ng, f