#include <iostream>
#include <cstring>
#include <algorithm>
#define x first
#define y second
using namespace std;
int n, k, t, x1, y1, x2, y2;
int main()
{
cin >> n >> k >> t >> x1 >> y1 >> x2 >> y2;
int res1 = 0, res2 = 0;
while (n -- )
{
bool r1 = false, r2 = false;
int s = 0;
for (int i = 0; i < t; i ++ )
{
int x, y;
cin >> x >> y;
if (x >= x1 && x <= x2 && y >= y1 && y <= y2)
{
s ++ ;
r1 = true;
if (s >= k) r2 = true;
}
else s = 0;
}
if (r1) res1 ++ ;
if (r2) res2 ++ ;
}
cout << res1 << endl << res2 << endl;
return 0;
}
09-30
474
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountBlack.png)
02-20
622
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountBlack.png)
05-20
1760
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountBlack.png)
09-04
247
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountBlack.png)