poj 2680 化验单
#include<string>
#include<iostream>
using namespace std;
struct Info
{
string sex;
float a,b,c,d,e;
};
int main()
{
Info info[101];
int n,i,k=0;
cin>>n;
while(k<n){
int countN=0,countI=0;
cin>>info[i].sex>>info[i].a>>info[i].b>>info[i].c>>info[i].d>>info[i].e;
if(info[i].sex=="female"){
if(info[i].a<=10.0 && info[i].a>=4.0)
countN++;
else
countI++;
if(info[i].b<=5.5 && info[i].b>=3.5)
countN++;
else
countI++;
if(info[i].c<=150 && info[i].c>=110)
countN++;
else
countI++;
if(info[i].d<=40 && info[i].d>=36)
countN++;
else
countI++;
if(info[i].e<=300 && info[i].e>=100)
countN++;
else
countI++;
if(countN==5)
cout<<"normal"<<endl;
else
cout<<countI<<endl;
}
else
{
if(info[i].a<=10.0 && info[i].a>=4.0)
countN++;
else
countI++;
if(info[i].b<=5.5 && info[i].b>=3.5)
countN++;
else
countI++;
if(info[i].c<=160 && info[i].c>=120)
countN++;
else
countI++;
if(info[i].d<=48 && info[i].d>=42)
countN++;
else
countI++;
if(info[i].e<=300 && info[i].e>=100)
countN++;
else
countI++;
if(countN==5)
cout<<"normal"<<endl;
else
cout<<countI<<endl;
}
k++;
}
return 0;
}