Loading problem...
You are given a table named Triangle that stores candidate segment triplets.
Columns:
The tuple (x, y, z) is unique for each row.
Task: For every row, determine whether these three segment lengths can form a valid triangle.
A row is valid when all triangle-inequality checks hold:
Return exactly these columns in this order:
Where triangle is:
Output row order is not semantically important.
Supported submission environments:
Triangle:
| x | y | z |
|----|----|----|
| 13 | 15 | 30 |
| 10 | 20 | 15 |[
{"x":10,"y":20,"z":15,"triangle":"Yes"},
{"x":13,"y":15,"z":30,"triangle":"No"}
](13, 15, 30) fails because 13 + 15 is not greater than 30. (10, 20, 15) satisfies all three strict inequalities.
Triangle:
| x | y | z |
|---|---|---|
| 5 | 5 | 5 |
| 3 | 4 | 5 |
| 1 | 1 | 2 |[
{"x":1,"y":1,"z":2,"triangle":"No"},
{"x":3,"y":4,"z":5,"triangle":"Yes"},
{"x":5,"y":5,"z":5,"triangle":"Yes"}
]Equilateral and classic 3-4-5 rows are valid. (1, 1, 2) is degenerate because 1 + 1 equals 2.
Triangle:
| x | y | z |
|---|---|---|
| 1 | 2 | 3 |
| 2 | 5 | 8 |
| 4 | 1 | 7 |[
{"x":1,"y":2,"z":3,"triangle":"No"},
{"x":2,"y":5,"z":8,"triangle":"No"},
{"x":4,"y":1,"z":7,"triangle":"No"}
]Every row fails at least one triangle inequality, so all labels are No.
Constraints