DCP-77: Mr. X and Super Triangle Back to All Problems

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


Problem Setter:

MD Musfiqur Rahman Sanim

Please login to submit solution to this problem.

Problem Limits

Language Time Limit (seconds)
C 3.50
C++ 3.50
C++14 3.50
C# 4.00
Go 4.00
Java 4.00
JavaScript 4.00
Objective-C 4.00
Perl 4.00
PHP 4.00
Python 4.00
Python3 4.00
Ruby 4.00
VB.Net 4.00

Problem Stats

13/73

Solve/Submission

Ranking

# User Language Timing
01 feodorv C 0.13s
02 ddhrubo Cpp14 1.59s
03 Matrix_code Cpp14 1.74s
04 khatribiru Cpp14 1.82s
05 sahedsohel Cpp14 1.84s
06 raihatneloy Cpp14 2.06s
07 inam Cpp14 2.55s
08 moinul_shaon Cpp14 2.63s
09 tariqiitju Cpp14 2.72s
10 pinanzo Cpp14 2.75s
11 nfssdq Cpp14 3.01s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support