#include <iostream>
#include <iomanip>
using namespace std;
int maxlow(double a[]){
if(a[0]>=a[1]&&a[0]>=a[2]){
return 0;
}else if(a[1]>=a[0]&&a[1]>=a[2]){
return 1;
}else{
return 2;
}
}
int main()
{
double g1[3],g2[3],g3[3];
cin>>g1[0]>>g1[1]>>g1[2];
cin>>g2[0]>>g2[1]>>g2[2];
cin>>g3[0]>>g3[1]>>g3[2];
int r[3];
r[0]=maxlow(g1);
r[1]=maxlow(g2);
r[2]=maxlow(g3);
double res=g1[r[0]]*g2[r[1]]*g3[r[2]];
for(int i=0;i<3;i++){
switch(r[i]){
case 0:cout<<'W'<<" ";break;
case 1:cout<<'T'<<" ";break;
case 2:cout<<'L'<<" ";break;
}
}
cout<<fixed<<setprecision(2)<<(res*0.65-1)*2<<endl;
return 0;
}
英文有点难理解,这题的目的也有点难理解;
本质上还是很简单的