can anyone help me by telling why my code 4Y97gD - Online C++ Compiler & Debugging Tool - Ideone.com for gss1 is giving tle.
just made a few optimistations,using shift operators for multiplication,division and fast io.
Your solution: Online Compiler and IDE - GeeksforGeeks
I dont think so,as ur logic is absolutely right.Even if u remove shift operators it’ll still get accepted.Majority of time is consumed due to I/O.U could try coding the iterative version.
when i removed shift operators i got tle.
U could remove the fast io,it’ll still get accepted (just use ‘\n’ instead of endl)
thanks didn’t knew that endl could make program that slow.
Sir Can we solve the same spoj GSS series problems using fenwick trees