博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
1011. World Cup Betting (20)
阅读量:6989 次
发布时间:2019-06-27

本文共 1866 字,大约阅读时间需要 6 分钟。

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 W for win, T for tie, and L for lose. There was an odd assigned to each result. The winner's odd would be the product of the three odds times 65%.

For example, 3 games' odds are given as the following:

W    T    L1.1  2.5  1.71.2  3.0  1.64.1  1.2  1.1

To obtain the maximum profit, one must buy W for the 3rd game, T for the 2nd game, and T for the 1st game. If each bet takes 2 yuans, then the maximum profit would be (4.1*3.0*2.5*65%-1)*2 = 37.98 yuans (accurate up to 2 decimal places).

Input

Each input file contains one test case. Each case contains the betting information of 3 games. Each game occupies a line with three distinct odds corresponding to W, T and L.

Output

For each test case, print in one line the best bet of each game, and the maximum profit accurate up to 2 decimal places. The characters and the number must be separated by one space.

Sample Input

1.1 2.5 1.71.2 3.0 1.64.1 1.2 1.1

Sample Output

T T W 37.98
1 #include
2 #include
3 #include
4 char out[4]={
'W','T','L'}; 5 6 int main() 7 { 8 double ans=1.0,max,temp; 9 int i,j,index;10 for( i=0; i<3 ;i++)11 {12 max = 0.0;13 for( j=0; j<3; j++)14 {15 scanf("%lf",&temp);16 if( max

 

转载于:https://www.cnblogs.com/yuxiaoba/p/8547716.html

你可能感兴趣的文章
【函数式权值分块】【分块】bzoj1901 Zju2112 Dynamic Rankings
查看>>
流程控制
查看>>
P4363 [九省联考2018]一双木棋chess(对抗搜索+记忆化搜索)
查看>>
execution plan in sqlserver
查看>>
【WCF之旅】第一回:概述
查看>>
设计模式(四)外观模式
查看>>
RadioGroup实现类似ios的分段选择(UISegmentedControl)控件
查看>>
51Nod 1079 中国剩余定理 Label:数论
查看>>
在sql结果中显示行号
查看>>
代码层次
查看>>
python基础一 day11 装饰器复习
查看>>
使用vs code编写Markdown文档以及markdown语法详解
查看>>
asp.net 关闭子窗体 刷新主窗体
查看>>
安全测试===BurpSuite使用教程-附安装包
查看>>
Chrome不能在网易网盘中上传文件的解决办法
查看>>
Axure实现多用户注册验证
查看>>
uva11292-Dragon of Loowater
查看>>
05-表操作
查看>>
实时通讯系列目录篇之SignalR详解
查看>>
Spring aop练手
查看>>