Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
123105 | 丁俊杰 | 校门外的树 | Python3 | Accepted | 66 MS | 3836 KB | 235 | 2025-06-28 00:25:26 |
n,m=map(int,input().split()) shu=[1]*(n+1) #有树的地方标记为1 for i in range(m): a,b=map(int,input().split()) for j in range(a,b+1): shu[j]=0 #移走的地方标记为0 res=shu.count(1) print(res)