#include using namespace std; int main(){ int N, M; scanf("%d%d", &N, &M); vector A(N + 1); for (int i = 0; i < M; i++){ int L, R; scanf("%d%d", &L, &R); R--; A[R]++; A[L]--; } for (int i = 0; i < N; i++){ A[i + 1] += A[i]; } reverse(A.begin(), A.end()); for (int i = 1; i <= N; i++){ printf("%d\n", A[i]); } }