1011 World Cup Betting (20 分)
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting fans were putting their money where their mouths were, by laying all manner of World Cup bets.
Chinese Football Lottery provided a “Triple Winning” game. The rule of winning was simple: first select any three of the games. Then for each selected game, bet on one of the three possible results – namely for win, for tie, and for lose. There was an odd assigned to each result. The winner’s odd would be the product of the three odds times 65%.
W ``T ``L
For example, 3 games’ odds are given as the following:
#include<bits/stdc++.h>
using namespace std;
int main()
{
double w,t,l,p=1;
char a[3];
for(int i=0;i<3;i++)
{
scanf("%lf %lf %lf",&w,&t,&l);
double m = max(max(w,t),l);
p=p*m;
if(m==w) a[i]='W';
if(m==t) a[i]='T';
if(m==l) a[i]='L';
}
printf("%c %c %c %.2lf",a[0],a[1],a[2],(p*0.65-1)*2);
return 0;
}
代码不算难,就是找出里面的最大值,W是win ,T是tie ,L是lose

本文介绍了2010年FIFA世界杯期间的足球彩票游戏——“Triple Winning”,玩家需要从三场比赛中选择并预测赢、平、输的结果,每种结果都有对应的赔率。赢家的赔率是三个最高赔率的乘积再乘以65%。提供的代码展示了如何计算赔率和预测结果。
201

被折叠的 条评论
为什么被折叠?



