I have doubt in the queries…suppose that we r given x1,x2,y1,y2,z1,z2…then …how do we calculate the sum.
1st Case->we need to calculate the sum of a small cuboid
with the end points as (x1,y1,z1),(x1,y2,z1),(x2,y1,z1),(x2,y2,z1),(x1,y1,z2),(x1,y2,z2),(x2,y1,z2),(x2,y2,z2). OR
2nd Case-> we first select a plane (x1,0,0)->(x2,0,0) and 2nd plane(0,y1,0)->(0,y2,0) and 3rd plane (0,0,z1)->(0,0,z2) and then we take the union of all the boxes covered…and then calculate the sum…