Need Help regarding TLE
Why i m getting TLE for this problem ??? and my solution is this. here preprocessing take O(n) and per query take constant time please help.