#includecstdio#includeiostream#includestring#includealgorithm#includecstringusing namespace std;int a[1000000];int main(){int m,n;int count=0;while(scanf("%d %d",m,n)==2mn){memset(a,0,sizeof(a));int i;count++;for(i=1;i=m*n;i++)cina[i];a[m*n
#include<cstdio>
#include<iostream>
#include<string>
#include<algorithm>
#include<cstring>
using namespace std;
int a[1000000];
int main(){
int m,n;
int count=0;
while(scanf("%d %d",&m,&n)==2&&m&&n){
memset(a,0,sizeof(a));
int i;
count++;
for(i=1;i<=m*n;i++)cin>>a[i];
a[m*n+1]=2111111110;
double v;
cin>>v;
v=v/100.0;//防止溢出
sort(a+1,a+m*n+1);
double sum=0,h,percenT;
for(i=1;i<=m*n;i++){
sum=sum+(double)(a[i+1]-a[i])*i;
if(sum>=v){
h=(double)a[i+1]-(double)(sum-v)/i;
break;
}
}
percenT=(double)i*100.0/(n*m);
cout<<"Region "<<count<<endl;
printf("Water level is %.2lf meters.\n",h);
printf("%.2lf percent of the region is under water.\n",percenT);
printf("\n");
}
}