A Vertical Approach to Computing Set Squared Distance