#t89. 铺地毯

铺地毯

Laying Carpets

Problem Description

Dazhi's dad made money building subways, so he bought a lot of carpets and laid them over the living room again and again.

The living room is exactly a rectangle, and the width of the carpets matches the width of the room, so along the length the carpets overlap. The length of the room is nn. Dazhi wants to know how many layers of carpet cover each 11-metre segment.

Input Format

The first line contains n,kn, k, where nn is the length of the room and kk is the number of carpets. 1≤n,k≤1051 \le n, k \le 10^5.

The following kk lines each contain a pair [x,y][x, y], both integers, the start and end positions of the ii-th carpet. 0≤x<y≤n0 \le x < y \le n.

Output Format

One line of integers, where the ii-th number is the number of carpets covering the ii-th metre.

Sample Input

4 3
1 3
0 2
1 4

Sample Output

1 3 2 1