class Solution { public: int maxPoints(vector &points) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance will be reused for each test case.
if(points.empty()) return 0;
map table;
for(int i = 0; i < points.size(); i++) for(int j = i+1; j < points.size();j++){
Line local(points[i],points[j]); table[local]++;
}
int maxcnt = 1;
auto maxLine = table.begin();
for(auto it = table.begin(); it != table.end(); ++it ) if( it->second > maxcnt){ maxcnt = it->second; maxLine = it; }