We know, distance between two 2D co-ordinate is sqrt( (x1 - x2) ^2 + (y1 - y2)^2 ). As Boltu takes square of it, we don't have to calculate the sqrt. Instead just calculate the value of ( (x1 - x2) ^2 + (y1 - y2)^2 ). Now, to find the two distant circles, we can run a nested loop to check all the combination and keep track of the maximum. A vector of pair can be used to trace all the co-ordinates. That's it! :)

Statistics

82% Solution Ratio
sayedgkmEarliest, Jul '17
rubbyEFastest, 0.0s
Mili290Lightest, 0 B
MD_ARAFATShortest, 222B
Toph uses cookies. By continuing you agree to our Cookie Policy.