150. Valid Triangle

Codeforces
IDCF10269150
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Your task for this problem is to take the three side lengths of a triangle and to determine if these side lengths could create a "valid" triangle. A triangle is considered valid if the addition of any two side lengths is less than the length of the other side, in other words, the following must evaluate to true: a+b>c, a+c>b, b+c>a. The first line contains three space separated integers that correspond to the lengths of sides a, b, and c respectively. Output either "VALID" or "INVALID" depending on if the provided side lengths create a valid or invalid triangle. ## Input The first line contains three space separated integers that correspond to the lengths of sides a, b, and c respectively. ## Output Output either "VALID" or "INVALID" depending on if the provided side lengths create a valid or invalid triangle. [samples]
**Definitions** Let $ a, b, c \in \mathbb{R}^+ $ be the side lengths of a triangle. **Constraints** None beyond positivity (implied by context). **Objective** Determine whether: $$ a + b > c \quad \land \quad a + c > b \quad \land \quad b + c > a $$ If true, output "VALID"; otherwise, output "INVALID".
API Response (JSON)
{
  "problem": {
    "name": "150. Valid Triangle",
    "description": {
      "content": "Your task for this problem is to take the three side lengths of a triangle and to determine if these side lengths could create a \"valid\" triangle. A triangle is considered valid if the addition of any",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269150"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Your task for this problem is to take the three side lengths of a triangle and to determine if these side lengths could create a \"valid\" triangle. A triangle is considered valid if the addition of any...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ a, b, c \\in \\mathbb{R}^+ $ be the side lengths of a triangle.\n\n**Constraints**  \nNone beyond positivity (implied by context).\n\n**Objective**  \nDetermine whether:  \n$$ a + b > c...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments