F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Math Problem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3767    Accepted Submission(s): 917


Problem Description
Here has an function:
  $f(x) = |a * x^3 + b * x^2 + c * x + d| (L \leq x \leq R)$
Please figure out the maximum result of f(x).
 

Input
Multiple test cases(less than 100). For each test case, there will be only 1 line contains 6 numbers a, b, c, d, L and R. $(-10 \leq a, b, c, d \leq 10, -100 \leq L \leq R \leq 100)$
 

Output
For each test case, print the answer that was rounded to 2 digits after decimal point in 1 line.
 

Sample Input
1.00 2.00 3.00 4.00 5.00 6.00
 

Sample Output
310.00
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 03:20:24, Gzip enabled