hi . i am not able to pass all the test cases of a question on hackerearth on fenwick trees .i have even checked my solution with the author's solution and not able to find what is the mistake . please need help . the question link https://www.hackerearth.com/practice/data-structures/advanced-data-structures/fenwick-binary-indexed-trees/practice-problems/algorithm/vanya-and-array-4/ my solution - http://ideone.com/vXHQV1