#include #include #include #include #include #include #include #include #include #include #include #include #define vll vector #define vvvl vector #define vvl vector> #define VV(a, b, c, d) vector>(a, vector(b, c)) #define VVV(a, b, c, d) vector(a, vvl(b, vll (c, d))); #define re(c, b) for(ll c=0;c> a >> b >> c >> d >> p >> q; ll MAX = -10000000000000, x = -1, MIN = 10000000000000, y = 0; for(ll i=p;i<=q;i++){ ll f = a*i*i*i+b*i*i+c*i+d; if(MAXf) MIN = f, y = i; } std::cout << MAX << " " << x << " " << MIN << " " << y << '\n'; return 0; }