I need an algorith to solve this problem
I have a task:
There is a screen size MxN and it is covered with cuboids with different height(there are MxN cuboids) . The water is poured out on it. I have to calculate capacity of water which remain in cuboids. I have to find few algoriths and compare time of calculation. I'll be grateful for quick help!!!
Re: I need an algorith to solve this problem
can you draw an algorithm for your task ?
I did not understand what you need to do...
1 Attachment(s)
Re: I need an algorith to solve this problem
I have an area like that in the picture. Thera are MxN squares (they are the same height and legth) symbolized a cuboide with different height (empty inside). The water is poured in this area and I have to calculate the capacity of the water which stay in this area.
Re: I need an algorith to solve this problem
Are all the cuboids filled to capacity with water?
If so surely its just adding up the volume of each of the specific cuboids with the volume of each cuboid being given by the formula length * width * height, if all cuboids are the same size and filled to capacity its simply number_of_cuboids * length * width * height.