Problem 2857 · Medium

Count Pairs of Points With Distance k

XOR is its own inverse, so each earlier point can be found by a hash lookup for every split of k between the two coordinates.

Open the interactive visualisation