Run ID:109681

提交时间:2025-02-10 14:22:01

L,M=map(int,input().split()) #L代表马路长度,M代表区域数目 list1=[1]*(L+1) #标记中了树的位置为1 for i in range(M): a,b=map(int,input().split()) for j in range(a,b+1): list1[j]=0 res=list1.count(1) print(res)