Wrong Answer in 3d Structure problem

Please check my code. It is working fine for given test case but giving WA on all the test cases on submitting.

Code link: https://ide.codingblocks.com/s/266548

@HemantKumar
what if update query occur for same set of x,y and z more than once. You are adding values in that case. But you have to first delete existing value and then update it.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.