http://acm.timus.ru/problem.aspx?space=1&num=1613
Hi, i am trying to solve this problem using SQRT decomposition but i am getting TLE, how can it be optimized more or is my approach wrong.
Here is my code: https://ideone.com/tnuvKA
Help with a SQRT Decomposition Problem
http://acm.timus.ru/problem.aspx?space=1&num=1613
Hi, i am trying to solve this problem using SQRT decomposition but i am getting TLE, how can it be optimized more or is my approach wrong.
Here is my code: https://ideone.com/tnuvKA