Partitioning a set of points in 2D plane
问题 The problem statement is - "You are given a set of N points, where N is even and N <= 1000. You have to find the number of pairs of points, such that if you draw a line through that pair, each side of the line will contains equal number of points(N/2-1)." I can't figure out, how to solve this problem in O(n^2) or less time? Here is my brute-force solution- class Point{ public: int x, y; Point(){x = y = 0;} void make_point(int X, int Y){ x = X; y = Y; } int Point:: orientation (Point &p0,