Run ID:86246
提交时间:2024-07-23 19:36:29
l,m = map(int,input().split()) street = [1 for x in range(l)] for i in range(m): s,f = map(int,input().split()) street = street[:s]+[0 for x in range(f-s)]+street[f:] print(sum(street)-1)