Pair of Topics approach

Why do we have to consider for duplicates values in this problem and store in PBDS as pair but when we didn’t have to do so in Inversion count problem.

https://codeforces.com/contest/1324/submission/76997627

Hi @rk221_b
refer to dis code


u will have to use pair inorder to take duplicates into consideration.
eg c = {0,1,1}
for 0 ans =2 since 0+1>0 for index 1 and 2
refer to code for more hhelp

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.