Run ID:78195

提交时间:2024-06-16 17:00:45

""" 500 3 150 300 100 200 470 471 """ a,b = input().split() a,b = int(a),int(b) trees = [True for x in range(a+1)] for block in range(b): start,end = map(int,input().split()) for x in range(start,end+1): trees[x] = False res = trees.count(True) print(res)