162. Parallel Lines

Codeforces
IDCF10269162
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Your younger sibling needs help with their algebra homework, and it involves a full worksheet of detecting parallel lines in equations! Too inarticulate to explain how to find these parallel lines, you decide to create a piece of code that will solve the problems for them. You will be given two lines of linear equations in $y = m x + b$ form. See the example input for the exact formatting. $m$ will always be written before the $x$ term, even if $m$ is equal to 1. If the two linear equations are parallel, output "PARALLEL", otherwise output "NOT PARALLEL". ## Input You will be given two lines of linear equations in $y = m x + b$ form. See the example input for the exact formatting. $m$ will always be written before the $x$ term, even if $m$ is equal to 1. ## Output If the two linear equations are parallel, output "PARALLEL", otherwise output "NOT PARALLEL". [samples]
**Definitions** Let $ L_1: y = m_1 x + b_1 $ and $ L_2: y = m_2 x + b_2 $ be two linear equations in slope-intercept form. **Constraints** - $ m_1, m_2, b_1, b_2 \in \mathbb{R} $ - $ m_1 $ and $ m_2 $ are explicitly given as coefficients of $ x $, possibly including implicit 1 (e.g., "x" means $ 1x $). **Objective** Determine if $ L_1 \parallel L_2 $: $$ \text{Output } \begin{cases} \text{"PARALLEL"} & \text{if } m_1 = m_2 \\ \text{"NOT PARALLEL"} & \text{otherwise} \end{cases} $$
API Response (JSON)
{
  "problem": {
    "name": "162. Parallel Lines",
    "description": {
      "content": "Your younger sibling needs help with their algebra homework, and it involves a full worksheet of detecting parallel lines in equations! Too inarticulate to explain how to find these parallel lines, yo",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269162"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Your younger sibling needs help with their algebra homework, and it involves a full worksheet of detecting parallel lines in equations! Too inarticulate to explain how to find these parallel lines, yo...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ L_1: y = m_1 x + b_1 $ and $ L_2: y = m_2 x + b_2 $ be two linear equations in slope-intercept form.\n\n**Constraints**  \n- $ m_1, m_2, b_1, b_2 \\in \\mathbb{R} $  \n- $ m_1 $ and ...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments