From Olympiad. Right triangle angle B = 90 midpoint M. Solve the geometry problem "Sharygin 2012/8".
Examples
Input:[1,2,3]
Output:0
Input:[2,3,4]
Output:0
Hints
In a right triangle, the midpoint M of the hypotenuse AC is the circumcenter — M is equidistant from A, B, and C, so MA = MB = MC.
Place the right angle B at the origin, A on the x-axis, and C on the y-axis. This coordinate choice eliminates radicals and makes the midpoint and perpendicular bisector computations trivial.
Use vector dot products to verify perpendicularity of constructed lines. Track signed ratios rather than absolute lengths to avoid floating-point division.
Sharygin 2012/8
**From Olympiad.** Right triangle angle B = 90 midpoint M. Solve the geometry problem "Sharygin 2012/8".