need help in geometry problem

Revision en2, by brucewayne123, 2016-07-13 13:01:30

problem link:- : hello everyone! i am trying this problem on counting triangles with non zero area.. my approach is to represent a line segmnet between every 2 pair of points by the value (slope,constant) and using a map i am able to count how many points lie on this line segment reprsented by y=mx+c; for this i have used a set inside a map to avoid duplicacy and also for line segment with infinte slope i have used a seperate map.. after that i am simply subtracting the triangles from every line segment for total (NC3). i cant figure out the reason for wrong answer.. please help.. my submission:-


  Rev. Lang. By When Δ Comment
en2 English brucewayne123 2016-07-13 13:01:30 114
en1 English brucewayne123 2016-07-13 13:00:26 721 Initial revision (published)