Problem Analysis:

  • Observation: To check the distance between 2 points X1,Y1 and X2,Y2, we can use the formula of Euclidean distance :-

    (X1X2)2+(Y1Y2)2.\sqrt{(X1-X2)^2+(Y1-Y2)^2}. As the co-ordinate of our origin is (0,0) , then the distance between origin(0,0) and a point(X,Y) is X2+Y2\sqrt{X^2+Y^2}.

  • Solution Idea: So we loop through all the points (X,Y) and check which point gives us minimum distance using X2+Y2\sqrt{X^2+Y^2} . That point is our answer point.

Statistics

72% Solution Ratio
Asif_AlimEarliest, 11M ago
user.3392Fastest, 0.0s
user.3392Lightest, 4.9 MB
user.4210Shortest, 301B
Toph uses cookies. By continuing you agree to our Cookie Policy.