need help in geometry problem : http://codeforces.me/problemset/problem/552/D

Правка en1, от brucewayne123, 2016-07-13 13:00:26

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

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский brucewayne123 2016-07-13 13:01:30 114
en1 Английский brucewayne123 2016-07-13 13:00:26 721 Initial revision (published)