题意:

给出三组小数,每组三个,分别代表一场比赛下注一块钱胜平负的赔率。输出投注的方案并计算投注两块钱期望收获。(赔率相乘后乘上0.65再减去本金2块钱)

AAAAAccepted code:

 #include<bits/stdc++.h>
using namespace std;
double a[][];
double mx[];
int pos[];
int main(){
for(int i=;i<=;++i)
for(int j=;j<=;++j){
cin>>a[i][j];
if(a[i][j]>mx[i]){
mx[i]=a[i][j];
pos[i]=j;
}
}
for(int i=;i<=;++i){
if(pos[i]==)
cout<<"W"<<" ";
else if(pos[i]==)
cout<<"T"<<" ";
else if(pos[i]==)
cout<<"L"<<" ";
}
double ans=(mx[]*mx[]*mx[])*0.65*2.0-2.0;
printf("%.2f",ans);
return ;
}

【PAT甲级】1011 World Cup Betting (20 分)的更多相关文章

  1. PAT 甲级 1011 World Cup Betting (20)(20 分)

    1011 World Cup Betting (20)(20 分)提问 With the 2010 FIFA World Cup running, football fans the world ov ...

  2. PAT 甲级 1011 World Cup Betting (20)(20 分)(水题,不用特别在乎精度)

    1011 World Cup Betting (20)(20 分) With the 2010 FIFA World Cup running, football fans the world over ...

  3. PAT 甲级 1011 World Cup Betting (20)(代码+思路)

    1011 World Cup Betting (20)(20 分) With the 2010 FIFA World Cup running, football fans the world over ...

  4. PAT Advanced 1011 World Cup Betting (20 分)

    With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...

  5. PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) 凌宸1642 题目描述: With the 2010 FIFA World Cu ...

  6. PAT甲 1011. World Cup Betting (20) 2016-09-09 23:06 18人阅读 评论(0) 收藏

    1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Wit ...

  7. PAT甲级——1011 World Cup Betting

    PATA1011 World Cup Betting With the 2010 FIFA World Cup running, football fans the world over were b ...

  8. PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) (找最值)

    With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...

  9. PAT 1011 World Cup Betting (20分) 比较大小难度级别

    题目 With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly exc ...

随机推荐

  1. HTML-based script和URL-based script使用规则

     选择哪种模式应该根据实际需要来进行,下面是一些常见的参考原则: 1.基于浏览器的应用程序推荐使用HTML-based script 2.不是基于浏览器的应用程序推荐使用URL-based scrip ...

  2. Django框架之ORM的相关操作之多对多三种方式(五)

    在之前的博客中已经讲述了使用ORM的多对多关系表,现在进行总结一下: 1.ORM自动帮助我们创建第三张表 2.手动创建第三张表,第三张表使用ForeignKey指向其他的两张表关联起来 3.手动创建第 ...

  3. iframe多层嵌套时,Jquery获取元素

    在项目中,尤其是后台管理项目,会使用到iframe嵌套的网页,说起iframe,真的是个让人头疼的东西,能避开是最好避开.不然要请随身备好氧气瓶哈(因为管理和调试过程中往往会被气缺氧!!!哈哈哈~~~ ...

  4. windows C++ 网络编程

    转载:https://blog.csdn.net/yao_hou/article/details/91400832  https://blog.csdn.net/Ctrl_qun/article/li ...

  5. yii2.0框架安装

    通过 Composer 安装 如果还没有安装 Composer,你可以按 getcomposer.org 中的方法安装. 在 Linux 和 Mac OS X 中可以运行如下命令: curl -sS ...

  6. JS-try/catch方法判断字符串是否为json格式

    定义: try/catch 语句用于处理代码中可能出现的错误信息,出现异常会导致程序崩溃,而try/catch 则可以保证程序的正常运行. try { //执行代码 不报错则 正常执行 不会进入下面的 ...

  7. oracle 提取文本中的数字

    提取文本中的数字部分,并转换为数字 TO_NUMBER(regexp_substr(AGE,'[0-9.]+'))

  8. stl_vector复习

    #include <iostream>#include <vector>#include <algorithm> //for_each#include <ct ...

  9. EAP认证

    EAP信息交换: 上图中展示的是OTP(一次性密码)实现EAP交换过程,具体的EAP交换过程如下: 步骤1:请求方向认证方发送EAPOL-Start消息,通知对方已经做到了认证准备(注意:若会话由认证 ...

  10. xadmin 后台管理

    xadmin后台管理 安装:luffy虚拟环境下 >: pip install https://codeload.github.com/sshwsfc/xadmin/zip/django2 注册 ...