## Fianna Ray Ordesia

View as PDF

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

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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 format, where and 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 coordinate. If there is a tie, break it by coordinate. It is guaranteed that there is at least and that there will be no more than possible positions Fianna can be at.

Your answer will be judged correct if its absolute or relative error does not exceed .

#### Constraints

All real numbers in the input have absolute values that do not exceed 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

• commented on July 29, 2017, 12: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?

• commented on Dec. 28, 2014, 1:26 p.m.

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

• commented on Dec. 28, 2014, 4:48 p.m.

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

• commented on Dec. 28, 2014, 7:23 p.m.

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

• commented on Dec. 28, 2014, 7:28 p.m.

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.

• commented on Dec. 28, 2014, 8:17 p.m.

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

hob