problem link:- : http://codeforces.me/problemset/problem/552/D 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:- http://codeforces.me/contest/552/submission/19069857