Use the '+1/-1' way to implement the min and max operators