Largest Gold Ingot - Problem Description Ramesh is a goldamith, who brought a large number of gold ingot each of different length (L) but equal breadth (B) and height (H). He wants to weld the ingots of same length with e Akash, to weld the ingots of same length with each other. But Akash forgot that he had to weld the ingots of same length, instead he welded the ingots in a random manner. Later Ramesh found out what he had done. He then ordered Akash to cut the welded ingot such that a cuboid with the largest volume from the welded gold ingot is obtained. Find the volume of summation of gold ingots minus volume of the largest cuboid. - Constraints O«G< 105 - Input First Line contains one integer G, denoting number of gold ingots Second line contains two space separated integers B and H, where B denotes the breadth and H denotes the height of individual ingot Third line contains G space separated integers, denoting the length of the individual gold ingots that are welded together in adjacent manner - Output An integer corresponding to the volume of summation of gold ingots minus volume of the largest cuboid, mod 109+7. - Time Limit - Examples Example 1 Input 11 6734513

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section: Chapter Questions
Problem 6PP: (Heat transfer) The formula developed in Exercise 5 can be used to determine the cooling time, t,...
icon
Related questions
Question
I need code only in python very quickly with output screen shot
UNLINE EDITUR (D)
Largest Gold Ingot
- Problem Description
Ramesh is a goldsmith, who brought a large number of goid ingot each of different length (L) but equal breadth (B) and height (H). He wants to weld the ingots of same length with each other. He tasks his new employee,
Akash, to weld the ingots of same length with each other. But Akash forgot that he had to weid the ingots of same length, instead he welded the ingots in a random manner.
Later Ramesh found out what he had done. He then ordered Akash to cut the welded ingot such that a cuboid with the largest volume from the welded gold ingot is obtained.
Find the volume of summation of gold ingots minus volume of the largest cuboid.
- Constraints
O<G< 105
- Input
First Line contains one integer G, denoting number of gold ingots
Second line contains two space separated integers B and H, where B denotes the breadth and H denotes the height of individual ingot
Third line contains G space separated integers, denoting the length of the individual gold ingots that are welded together in adjacent manner
- Output
An integer corresponding to the volume of summation of gold ingots minus volume of the largest cuboid, mod 109+7.
- Time Limit
- Examples
Example 1
Inout
11
6734513
Output
14
09:27
Transcribed Image Text:UNLINE EDITUR (D) Largest Gold Ingot - Problem Description Ramesh is a goldsmith, who brought a large number of goid ingot each of different length (L) but equal breadth (B) and height (H). He wants to weld the ingots of same length with each other. He tasks his new employee, Akash, to weld the ingots of same length with each other. But Akash forgot that he had to weid the ingots of same length, instead he welded the ingots in a random manner. Later Ramesh found out what he had done. He then ordered Akash to cut the welded ingot such that a cuboid with the largest volume from the welded gold ingot is obtained. Find the volume of summation of gold ingots minus volume of the largest cuboid. - Constraints O<G< 105 - Input First Line contains one integer G, denoting number of gold ingots Second line contains two space separated integers B and H, where B denotes the breadth and H denotes the height of individual ingot Third line contains G space separated integers, denoting the length of the individual gold ingots that are welded together in adjacent manner - Output An integer corresponding to the volume of summation of gold ingots minus volume of the largest cuboid, mod 109+7. - Time Limit - Examples Example 1 Inout 11 6734513 Output 14 09:27
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Maximum Flow
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr