#include <stdio.h> int main() { int L, M; while (scanf("%d%d", &L, &M) != EOF) { int road[10001]; for (int i = 0; i <= L; i++) { road[i] = 1; } for (int q = 0; q < M; q++) { int left, right; scanf("%d%d", &left, &right); for (int i = left; i <= right; i++) { ...