cpp implementation of 3Sum Closest