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
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.