## Weight of the System of Nested Segments solution codeforces -On the number line there are mm points, ii-th of which has integer coordinate xixi and integer weight wiwi. The coordinates of all points are different, and the points are numbered from 11 to mm.

Weight of the System of Nested Segments solution codeforces On the number line there are mm points, ii-th of which has integer coordinate xixi and integer weight wiwi. The coordinates of all points are different, and the points are numbered from 11 to mm. A sequence of nn segments [l1,r1],[l2,r2],…,[ln,rn][l1,r1],[l2,r2],…,[ln,rn] is called system of nested segments if for each pair i,ji,j (1≤i<j≤n1≤i<j≤n) the condition li<lj<rj<rili<lj<rj<ri is satisfied. In other words, the second segment is … Read more