thanks fr your help guys…
Nice .
Btw did you try to submit this one ?
low is 10*10
not 10**9
.
And it hits a TLE in the second subtask, even though the same thing in c++ gets through.
is this work O(nlogn) in count solns for following test-
1
10 8
4 4 4 4 4 4 4 4 4 4
@joney for each of test case it is O(nlog(n))
1 Like
O notation implies worst case for any type of the test case
if you have any doubts regarding this post the ask i will try to clear your doubt
Could you please help me out with why the second if condition was necessary ?
why is it cakewalk? it is so hard
1 Like