CCF CSP202009-2风险人群筛选
#include<iostream>
using namespace std;
int main(){
int n,k,t,xl,yl,xr,yr,ans1 = 0,ans2 = 0;
cin>>n>>k>>t>>xl>>yl>>xr>>yr;
for(int i = 0; i < n; i++){
int count = 0;
bool flag1 = false,flag2 = false;
for(int j = 0; j < t; j++){
int x,y;
cin>>x>>y;
if(x >= xl && x <= xr && y >= yl && y<= yr){
count++;
flag1 = true;
if(count >= k) flag2 = true;
}
else{
count = 0;
}
}
if(flag2) ans2++;
if(flag1) ans1++;
}
cout<<ans1<<endl<<ans2<<endl;
return 0;
}