{"problem":{"name":"197. Three Lines","description":{"content":"You're given three lines on the coordinate plane. No pairs of the lines are parallel. Figure out the area of the triangle formed by the intersection points of the three lines. In other words, label t","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269197"},"statements":[{"statement_type":"Markdown","content":"You're given three lines on the coordinate plane. No pairs of the lines are parallel.\n\nFigure out the area of the triangle formed by the intersection points of the three lines. In other words, label the points of interesection of lines 1 and 2, lines 1 and 3, and lines 2 and 3, $A$, $B$, and $C$, respectively. Then, your task is to find the area of triangle $A B C$.\n\nThe input consists of three lines, each containing the equation for one of the lines, in $y = m x + b$ form, where $m$ represents the slope of the line, and $b$ represents the y-intercept of the line.\n\nOutput a single decimal number representing the area of the triangle formed by the intersection points of the three lines. Do not round your answer. Your answer doesn't have to be exactly equal to ours; as long as it's within a few decimal places it will be judged as correct.\n\nHere is the graph of the first example case:\n\n## Input\n\nThe input consists of three lines, each containing the equation for one of the lines, in $y = m x + b$ form, where $m$ represents the slope of the line, and $b$ represents the y-intercept of the line.\n\n## Output\n\nOutput a single decimal number representing the area of the triangle formed by the intersection points of the three lines. Do not round your answer. Your answer doesn't have to be exactly equal to ours; as long as it's within a few decimal places it will be judged as correct.\n\n[samples]\n\n## Note\n\nHere is the graph of the first example case:","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet the three lines be given by:  \n$$\nL_1: y = m_1 x + b_1, \\quad L_2: y = m_2 x + b_2, \\quad L_3: y = m_3 x + b_3\n$$  \nwith $m_i \\ne m_j$ for all $i \\ne j$ (no two lines are parallel).\n\nLet $A = L_1 \\cap L_2$, $B = L_1 \\cap L_3$, $C = L_2 \\cap L_3$ be the pairwise intersection points.\n\n**Objective**  \nCompute the area of triangle $ABC$ with vertices at:  \n$$\nA = \\left( \\frac{b_2 - b_1}{m_1 - m_2}, \\frac{m_1 b_2 - m_2 b_1}{m_1 - m_2} \\right), \\quad\nB = \\left( \\frac{b_3 - b_1}{m_1 - m_3}, \\frac{m_1 b_3 - m_3 b_1}{m_1 - m_3} \\right), \\quad\nC = \\left( \\frac{b_3 - b_2}{m_2 - m_3}, \\frac{m_2 b_3 - m_3 b_2}{m_2 - m_3} \\right)\n$$\n\nThe area is given by the determinant formula:  \n$$\n\\text{Area} = \\frac{1}{2} \\left| x_A(y_B - y_C) + x_B(y_C - y_A) + x_C(y_A - y_B) \\right|\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269197","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}