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

ago in Online Assessments by Expert (147,390 points) | 146 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
ago by (180 points)