#Codechef_practice You can just post the Logic Ques. Nice - TopicsExpress



          

#Codechef_practice You can just post the Logic Ques. Nice Quadrangles There are n points with integer coordinates. We can form different quadrangles out of them by taking four different points and connecting them with lines. Let’s call a quadrangle ABCD nice if and only if: Ax > 0 and Ay > 0; Bx > 0 and By < 0; Cx < 0 and Cy < 0; Dx < 0 and Dy > 0; ABCD has an integer area. Your task is to count all different nice quadrangles that can be formed on the given points. Input The first line of input file contains number t – the number of test cases. Then the description of each test case follows. The first line of each test case contains number n – the number of points. Then n lines follow each consisting of two integers x, y – the coordinates of a point. No two points in the same test case coincide. Constraints 1
Posted on: Thu, 30 Oct 2014 14:30:00 +0000

Trending Topics



Recently Viewed Topics




© 2015