#include <iostream>
using namespace std;
int main(int argc, char** argv) {
int N,D,K,count,countKk=0,countKz=0;
float num,e;
int flag;
cin>>N>>e>>D;
for(int i=0;i<N;i++){
cin>>K;
count=0;
flag=0;
for(int j=0;j<K;j++){
cin>>num;
if(num<e) count++;
}
if(count>K*1.0/2){
flag=1;//可能空置
}
if(flag==1&&K>D){
flag=2;//空置
}
if(flag==1){
countKk++;
}else if(flag==2){
countKz++;
}
}
printf("%.1f%% %.1f%%",countKk*1.0/N*100,countKz*1.0/N*100);
return 0;
}
PAT乙级1053 住房空置率
最新推荐文章于 2021-01-16 10:51:34 发布