Hi, I came across one question from codechef.
Click Here
Here, we are given P and S.
Let l, b, h be the length, breadth, height of the box.
we have these two inequalities
4(l+b+h) <= P
2(lb+bh+hl) <= S
We have to maximise the volume which is lb*h.
We are also given that test cases will produce optimal solution.
Can any 1 please help me with it?
prakhs
0
Newbie Poster
Recommended Answers
Jump to PostCan any 1 please help me with it?
What kind of help do you want? You clearly haven't done anything yourself, so it's hard to construe "help" to mean anything except "tell me the solution and how to code it".
All 3 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
prakhs
0
Newbie Poster
Adak
419
Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.