#C1862. Equilateral Triangle Checker
Equilateral Triangle Checker
Equilateral Triangle Checker
Given the coordinates of three points, determine whether they form an equilateral triangle. An equilateral triangle is one where all sides are equal in length.
You can compute the distance between two points \( (x_1, y_1) \) and \( (x_2, y_2) \) using the formula:
\( d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \).
Take care of floating-point arithmetic when performing equality comparisons; a small tolerance should be used.
inputFormat
The input consists of three lines. Each line contains two space-separated floating-point numbers representing the coordinates \( x \) and \( y \) of a point.
outputFormat
Output a single line containing true
if the points form an equilateral triangle, and false
otherwise.
0 0
3 0
1.5 2.598076211353316
true