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!!!
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.
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.
Get Microsoft Visual C++ Express here or CodeBlocks here.
Get STLFilt here to radically improve error messages when using the STL.
Get these two can't live without C++ libraries, BOOST here and Loki here.
Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors.
Always use [code] code tags [/code] to make code legible and preserve indentation.
Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.