D. Nested Segmentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n segments on a line. There are no ends of some segments that coincide. For each segment find the number of segments it contains.InputThe first line contains a single integer n (1 ≤ n ≤ 2·105) — the number of segments on a line.Each of the next n lines contains two integers li and ri ( - 109 ≤ li < ri ≤ 109) — the coordinates of the left and the right ends of the i-th segment. It is guaranteed that there are no ends of some segments that coincide.OutputPrint n lines. The j-th of them should contain the only integer aj — the number of segments contained in the j-th segment.ExamplesInput41 82 34 75 6Output3010Input33 41 52 6Output011
Input41 82 34 75 6
Output3010
['data structures', 'sortings', '*1800']