What two conditions must hold for a competitive market to produce efficient outcomes?

Supply curves must reflect all costs of production, and demand curves must reflect consumers’ full willingness to pay.