How will it be greater than 10^8 if time complexity is n*n
And n is 1000???ans clearly and in this doubt have I asked that why my code is giving tle …so clear that part as well…
Time complexity
you said there were 1000, test cases so they would multiply into n^2
we only look at n right ??
why are u ounting the no of testcases??
even in editorial of codechef n*n soln is given
if thats the case then there must be an addition constraint that limits the sum of n
yes that is sum of n over all testcases n<=5000…
2 days and ta doesnt reply …ta takes more than 1 week to clear a doubt related to time complexity…
i already told you to try to re-write the provided code in a more clean fashion so that it becomes feasible for someone to understand it
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.