STNBD P5 - Fianna Ray Ordesia

View as PDF

Submit solution

Points: 10 (partial)
Time limit: 1.0s
Memory limit: 32M

Author:
Problem type

Fianna has a special elemental waffe called «Save the Queen». She can power up all allies in a certain radius from where she deploys the elemental waffe. Today, she is fighting alongside Ellis and Kamito on a 2 dimensional coordinate plane. Fianna wants to power up Ellis and Kamito by the same amount, so she wants to be equidistant from both of them. Given the positions of Ellis and Kamito and the exact distance Fianna wants to be from both of them, where should Fianna deploy her elemental waffe?

Input Specification

All positions are given in (x, y) format, where x and y are real numbers.

The first line of input will have Ellis's position.

The second line of input will have Kamito's position.

The third line will have a real number, the distance Fianna wants to be away from Ellis and Kamito.

Output Specification

You should output all possible positions Fianna can have in increasing order of x coordinate. If there is a tie, break it by y coordinate. It is guaranteed that there is at least 1 and that there will be no more than 10\,000 possible positions Fianna can be at.

Your answer will be judged correct if its absolute or relative error does not exceed 10^{-6}.

Constraints

All real numbers in the input have absolute values that do not exceed 300 given to exactly 6 digits after the decimal point.

Sample Input

0.000000 0.000000
0.000000 2.000000
1.000000

Sample Output

0.000000 1.000000

Comments


  • 7
    aeternalis1  commented on July 29, 2017, 4:16 a.m.

    Clarification

    I may just be stupid, but I can't understand part of the question. The problem states that the waffe should be deployed at an exact distance (no more and no less than specified) from both Ellis and Kamito. However, given that information, shouldn't there be a maximum of two points where it can be deployed, regardless of test case?


  • -4
    bobhob314  commented on Dec. 28, 2014, 6:26 p.m. edited

    If E = (0, 0), K = (0, 2) and the equidistant distance x = 1, then a possible waffe location is (1, 0), not (0, 1).


    • 1
      FatalEagle  commented on Dec. 28, 2014, 9:48 p.m. edited

      The distance from (1, 0) to (0, 2) is not 1.


      • -1
        bobhob314  commented on Dec. 29, 2014, 12:23 a.m. edited

        No, I know. I mean the distance that makes the distance from E to the midpoint to K where the distances are equidistant are each 1 (making EK = 2), so the possible waffe location is (1, 0) (x being 1, y being 0), not (0, 1) as is stated.

        Thanks,

        hob


        • 1
          FatalEagle  commented on Dec. 29, 2014, 12:28 a.m. edited

          I'm not sure what you're asking here.

          The elemental waffe's location should be (0, 1) because the distance from (0, 1) to (0, 0) is equal to the distance from (0, 1) to (0, 2) which is equal to 1. There is only one such possible location.


          • 0
            bobhob314  commented on Dec. 29, 2014, 1:17 a.m.

            XD Never mind, I done goofed. Thanks for putting up with me.

            hob