Page 1 of 1

solution in C output is just amount of n pairs found from the particular set of coordinates given

Posted: Sun Jul 03, 2022 12:00 pm
by answerhappygod
solution in C
Solution In C Output Is Just Amount Of N Pairs Found From The Particular Set Of Coordinates Given 1
Solution In C Output Is Just Amount Of N Pairs Found From The Particular Set Of Coordinates Given 1 (60.95 KiB) Viewed 25 times
output is just amount of n pairs found from the particular set of coordinates given
Two stars belong to the same constellation if distance between their projections on a two-dimensional sky plan isn't more than D units. Input The first line contains the number of stars N (0 <= N <= 1, 000) and the distance D (a real number 0.0 <= D <= 1,000.00 ). Next N lines have a pair of real coordinates X Y 1,000.00 <= X, Y <= 1,000.00 ) for each star in the sky. All real numbers in the input will have at most 2 (two) digits after a decimal point. (where Output Output the number N that is the number of constellations in Calvin's sky. Example 1 Input: 5 1.5 1.0 0.1 2.0 0.0 5.0 0.2 6.0 0.4 3.0 -0.1 Output: 2 Example 2 Input: 3 4.0 121.12 254.06 645.04 301.85 912.49 568.96 Output: 3