Easy Geometry > Basic Geometry

You know Mr. X is a geometry lover. This time he found n polar coordinate. He chose 3 point from this coordinate and draw a triangle. Now he wants to draw some super triangle with this process. A triangle is super triangle if, 1. Area of the triangle should be greater than 0. 2. Triangle should be Equilateral Triangle or Right Triangle. 3. If we draw a Circumcircle of this triangle, center of this circle should be (0, 0). Your task is find the number of super circle can be drawn with this polar coordinate. All the polar coordinate are distinct. Input: ------ First line contains the number of test case **T**(1 <= T <= 100). For each test case, first line contain the number of coordinate’s **n**(1 <= n <= 10^5). Next n contains the **r** (1 <= r <= 10^5) (the radial coordinate) and **t** (0 <= t < 360) (the angular coordinate. Output: ------- For each test case, print a line “Case x: y” where x is replaced by the test case number and y is the number of super triangle can be drawn with this n coordinates. Sample Input ------------ 1 5 1 0 1 45 2 20 3 40 1 180 Sample Output ------------- Case 1: 1

MD Musfiqur Rahman Sanim