Why am i getting wrong answer only sample test case passed.
My Soltion-https://ide.codingblocks.com/s/71279
3-D Structure Problem
Suppose you have block 2 * 2 * 2.
and you need to find sum of x=(2 to 2) and y=(2 to 2) and z =(2 to 2 )
means total sub-blocks are = 8 and you need sum of last sub-block
you are doing
Acording to your code-
Query(2,2,2)-Query(1,1,1)
you skipped to subtract the sum of block at (1,2,2) (1,2,1) ,(2,1,1) (2,2,1) (1,1,2) (2,1,1)
1 Like
If your doubt is resolved then please mark it as resolved in your online course’s ask doubt section.