if __name__ == '__main__':
n,k,t,xl,yd,xr,yu = map(int, input().split())
ans_pass, ans_stay = 0, 0
# 每一行代表居民过去t个时刻的位置记录
for i in range(n):
arr = list(map(int, input().split()))
count = 0
max_count = 0
for j in range(t):
x, y = arr[2*j], arr[2*j + 1]
if x >= xl and x <= xr and y >= yd and y <= yu:
count += 1
max_count = max(max_count, count)
else:
count = 0
if max_count > 0:
ans_pass += 1
if max_count >= k:
ans_stay += 1
print(ans_pass)
print(ans_stay)
06-03
140
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-05
265
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-04
347
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-17
344
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)