← 返回 netflix 的题目列表Find K Closest Points to Origin Using Euclidean Distance
类型:online_judge
netflix
Given a list of points in the coordinate plane, find the k closest points to the origin (0, 0). You can assume that k is always valid, i.e., 1 ≤ k ≤ number of given points. Use the Euclidean distance formula to calculate distance.
Example
Input
4
1 3
-2 2
5 8
0 1
2