Fenwick tree with binary search help please

CodeChef: Practical coding for everyone please help someone
fenwick tree with binary search on it