if __name__ == '__main__':
n, k = map(int, input().split())
s = set()
# 0 表示常量
s.add(0)
ans = 0
for i in range(k):
x, y = map(int, input().split())
if y not in s:
ans += 1
s.add(x)
print(ans)
[Python3] CSP 未初始化警告
最新推荐文章于 2022-10-28 15:52:06 发布