Divide and concur: A general approach to constraint satisfaction