3D structure problem


What’s the mistake ? All test cases wrong answer

@nayakashutosh99
Your way of using fenwick trees is not correct
See the editorial once
You need to use fenwick tree in succesive depths
You cant use them at once in all 3 axes

Do I need to create 3 fenwick trees for 3 axes?

@nayakashutosh99
Yes a 3d fenwick tree
I would really encourage you to open the editorial
This is kind of a tricky question

okay thank you very much!!!

1 Like

Can you please send me the solution as I am unable to unlock the editorial and I wrote a mail to support but they haven’t done anything. It has been a long time since I mailed them. So if you can send the solution it would be better.

Hey @nayakashutosh99
This problem is from hackerrank
You can open the editorial here

Thank you very much!!!

1 Like