Calculate the minimum value of F (x) on [] for n quadratic functions Si (x), F (x) = max {Si (x. S (x) = ax ^ 2 + bx + c (0 <= a <= 100, | B |, | c | <= 5000) after a simple analysis, we can see that the image of function F (x) is a subconvex function. You can use the three-way method to obtain the greatest value. CODE: # include <cstdio> # include <algorithm> using namespace std; const int maxn = 10000 + 10; int n, a [maxn], B [maxn], c [maxn]; double F (double x) {double ans = a [0] * x + B [0] * x + c [0]; for (int I = 1; I <n; ++ I) ans = max (ans, a [I] * x + B [I] * x + c [I]); return ans;} int main () {int T; scanf ("% d", & T); while (T --) {scanf ("% d", & n); for (int I = 0; I <n; ++ I) scanf ("% d", & a [I], & B [I], & c [I]); double L = 0.0, R = 1000.0; for (int I = 0; I <100; ++ I) {double m1 = L + (R-L)/3; double m2 = R-(R-L)/3; if (F (m1) <F (m2) R = m2; else L = m1;} printf ("%. 4lf \ n ", F (L);} return 0;} The Extreme Value of the single-peak function can also be obtained by golden division.