1011 World Cup Betting (20分)

虽然没读懂题意,按照样例模拟交了一发直接过了。。。

double a[3][3];

int main()
{

    for(int i=0;i<3;i++)
        for(int j=0;j<3;j++)
            cin>>a[i][j];

    double res=1;
    for(int i=0;i<3;i++)
    {
        int index=0;
        for(int j=0;j<3;j++)
            if(a[i][index] < a[i][j])
                index=j;

        if(index == 0) cout<<"W ";
        else if(index == 1) cout<<"T ";
        else cout<<"L ";
        res=res*a[i][index];
    }

    printf("%.2f",(res*0.65-1)*2);

    //system("pause");
    return 0;
}
原文地址:https://www.cnblogs.com/fxh0707/p/14226544.html