#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main() { ll n, m; cin >> n >> m; vector d(n), sum(n); for (int i = 0; i < m; i++){ int be, end; cin >> be >> end; d[n-be]++; if (end != 1) d[n- end + 1]--; } for (int i = 0; i < n; i++){ sum[i] += d[i]; if (i) sum[i] += sum[i-1]; cout << sum[i] << endl; } }