DMOPC '17 Contest 4 P0 - Catch

View as PDF

Submit solution


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

Author:
Problem type

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 D represents the longest distance between David and any of the three other players, what is the maximum possible value of D2?

Constraints

100x1,x2,x3,y1,y2,y3100

Input Specification

The first line of input will have two integers, x1 and y1, Alice's location.
The second line of input will have two integers, x2 and y2, Bob's location.
The third and final line of input will have two integers, x3 and y3, Charlie's location.

Output Specification

A single integer, the maximum value of D2.

Sample Input

Copy
1 0
2 0
3 0

Sample Output

Copy
1

Explanation for Sample Output

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


Comments

There are no comments at the moment.