题目:Max Points on a line Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 这道题需要稍微转变一下思路,用斜率来实现,试想找在同一条直线上的点,怎么判断在一条直线上,唯一的方式也只有斜率可以完成,我开始没想到,后来看网友的思路才想到的,下面是简单的实现:其中有一点小技巧,利用map<double, int>来存储具有相同斜率
Intersecting Lines Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13481 Accepted: 5997 Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three