#include <bits/stdc++.h>
using namespace std;
bool mysort1(int x,int y){
return x>y;
}
bool mysort2(int x,int y){
return x<y;
}
int main(){
int n,x=0,y=0;
string str1;
cin>>n;
double a[40]={},b[40]={};
for(int i=0;i<n;i++){
cin>>str1;
if(str1=="male"){
cin>>a[x];
x++;
}
else{
cin>>b[y];
y++;
}
}
sort(a,a+x,mysort2);
sort(b,b+y,mysort1);
for(int i=0;i<x;i++){
cout<<fixed<<setprecision(2)<<a[i]<<" ";
}
for(int i=0;i<y;i++){
cout<<fixed<<setprecision(2)<<b[i]<<" ";
}
return 0;
}
做不对哇,谁来帮忙