Question link : http://www.spoj.com/problems/OLOLO/
Answer link : http://ideone.com/FDClmr
I am Getting TLE in a O(nlg(n)) submission even after using fast I/O.
Can’t figure out the problem.
PS : I know approach of using xor , just want to know why i am getting TLE in this code.
cant understand why this approach works
while this shows TLE
while complexity of both is same