APPROX2 - Editorial

@aayush yes it is working

@aayush just submitted

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))

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

http://www.codechef.com/viewsolution/3950897 . Please point out whats wrong in this code. It give TLE for subtask 2.

This can be solved using dp (kind of)
solution : https://www.codechef.com/viewsolution/11052793

https://discuss.codechef.com/users/25511/ma5termind
why are you using two condition of itrator

if(it!=arr.end())

And
it1–

If(it1!=it)
In your code please explain me

@ma5termind
Please answer my dout