It would be great if someone could explain how to exactly solve this problem .
I know about BIT , had even tried of using it during the contest but I don`t know how , even after reading the editorial. Please explain in a better way . Thanks .
Also it`d be great if you could suggest similar problems .