#P1883. 【模板】三分 / 函数 / [ICPC-Chengdu 2010] Error Curves
【模板】三分 / 函数 / [ICPC-Chengdu 2010] Error Curves
Description
Given quadratic functions (each of the form ), let . Find the minimum value of on the interval .
Input Format
The first line contains a positive integer , the number of test cases.
For each test case, the first line contains a positive integer . Then lines follow, each with integers representing the three coefficients of a quadratic function. Note that a quadratic function may degenerate into a linear function.
Output Format
For each test case, output one line with the minimum value of on the interval . The answer should be rounded to decimal places.
2
1
2 0 0
2
2 0 0
2 -4 2
0.0000
0.5000
Hint
For of the testdata, .
For of the testdata, , , , , .
Translated by ChatGPT 5
京公网安备 11011102002149号