Mavs beat Nets 111-104