## DMOPC '17 Contest 4 P0 - Catch

View as PDF

Points: 3
Time limit: 1.0s
Memory limit: 64M

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

The problem statement is incorrect. The intent of the statement is to compute the square of the minimum pairwise distance between Alice, Bob, and Charlie. Anyone seriously affected by this mistake may ask to be unrated for this contest.

Alice, Bob, and Charlie are playing a game of catch. David wants to join, but he knows that he can't throw as far as Alice, Bob, or Charlie, so he requests to stand no further from Alice than Bob and Charlie, no further from Bob than Alice and Charlie, and no further from Charlie than Alice and Bob. If represents the longest distance between David and any of the three other players, what is the maximum possible value of ?

#### Input Specification

The first line of input will have two integers, and , Alice's location.
The second line of input will have two integers, and , Bob's location.
The third and final line of input will have two integers, and , Charlie's location.

#### Output Specification

A single integer, the maximum value of .

1 0
2 0
3 0

1

#### Explanation for Sample Output

The square of the pairwise distances are , , and . The smallest of these is .