#P1840. Color the Axis
Color the Axis
Description
On a number line there are points, namely . Initially, all points are colored black. Then we perform operations; in the -th operation, the points in are painted white. Output the number of black points remaining after each operation.
Input Format
The first line contains and . Each of the next lines contains two integers , .
Output Format
Output lines, where each line is the number of black points remaining after the corresponding operation.
10 3
3 3
5 7
2 8
9
6
3
Hint
- For 30% of the testdata, , .
- For 100% of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号