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    L
1.1 2.5 1.7
1.2 3.1 1.6
4.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 ( yuans (accurate up to 2 decimal places).

Input Specification:

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 WT and L.

Output Specification:

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.7
1.2 3.1 1.6
4.1 1.2 1.1

Sample Output:

T T W 39.31

#include <iostream>
using namespace std;
int main(){
int a=;double res=1.0,W,T,L;
while(a--){
cin>>W>>T>>L;
if(W>T&&W>L) {
cout<<"W ";
res*=W;
}
if(T>W&&T>L) {
cout<<"T ";
res*=T;
}
if(L>W&&L>T) {
cout<<"L ";
res*=L;
}
}
res=(res*0.65-)*;
printf("%.2f",res);
system("pause");
return ;
}

最新文章

  1. Spring的3种切入点PointCut实现
  2. CSS3常用选择器(二)
  3. WebApi调试中遇到的一些问题
  4. iOS:UIAlertController和UIAlertAction的详解
  5. nini
  6. oracle redo日志维护
  7. php异步请求模拟多进程
  8. I Love You Too HDU 2816
  9. maven中添加proguard来混淆代码
  10. 兼容IE低版本
  11. Devexpress Ribbon 动态生成菜单
  12. Oracle Database 快捷版 安装 连接
  13. mysql 导入 CSV文件命令行 ERROR 13 (HY000): Can&#39;t get stat of
  14. 【原创】hdu 1166 敌兵布阵(线段树→单点更新,区间查询)
  15. 验证Xpath和CSS 路径是否有效
  16. django 自动化测试的故障排查
  17. c# 匿名函数与托付
  18. 无法执行 varchar 值到 varchar 的隐式转换,原因是,由于排序规则冲突,该值的排序规则未经解析。
  19. python练习笔记——模拟双色球随机输出情况
  20. Android的网络编程

热门文章

  1. onCreateViewHolder方法加载了子项的布局
  2. flask中request对象获取参数的方法
  3. SpringBoot整合Shiro实现权限控制,验证码
  4. 编译Chrome详细步骤
  5. React Native商城项目实战07 - 设置“More”界面导航条
  6. React Native商城项目实战03 - 包装Navigator
  7. python2与3自由切换
  8. input 输入框效验
  9. 在word中的表格指定位置插入一行
  10. Delphi XE2 之 FireMonkey 入门(31) - 数据绑定: 绑定数据库