Education + Jobs Hiring Website - 2025
0 like 0 dislike
512 views

in Online Assessments by Expert (147,410 points) | 512 views

1 Answer

0 like 0 dislike
ok a variation of count inversion problem
rearrange the equation as (ai-bi) + (c-d) <= (aj-bj)
now make an array of (ai-bi) for all i = 0 -> n-1 and count these pairs
by (180 points)