#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;
}
标签:include,r2,int,x1,++,y1,CCF,CSP,3293
From: https://blog.csdn.net/2303_79132118/article/details/141930071