题意:

给出三组小数,每组三个,分别代表一场比赛下注一块钱胜平负的赔率。输出投注的方案并计算投注两块钱期望收获。(赔率相乘后乘上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. Linux双网卡bond、起子接口

    适用场景 服务器两张网卡需要做bond,并且bond后网卡需配置不同网段的地址,用于走不同流量,这个时候就可以采用起子接口的方式. 实验场景 设备 服务器:Server_A 核心交换机:Switch_ ...

  2. java调用第三方接口(转载)

    在很多时候有些别人做过的东西直接拿来用就好了,例如:身份证的信息.某个地区的天气.电话归属地等等. 代码 //import com.alibaba.fastjson.JSONObject; impor ...

  3. blg_统考,打印准考证 网页代码!

    <html xmlns="http://www.w3.org/1999/xhtml"><head> <title>打印准考证</title ...

  4. linux下的apue.3e安装[Unix环境高级编程]

    近期正在看<Unix环境高级编程>一书,目前看了20多页,书中 有几个c的例程,于是想着,也让它运行一下,看看是否跟描述相符,做开发人员本应该这样,于是敲了一部分代码,然后编译,发现并不能 ...

  5. Linux下编译并使用miracl密码库

    参考:http://blog.sina.com.cn/s/blog_53fdf1590102y9ox.html MIRACL(Multiprecision Integer and RationalAr ...

  6. 【PAT甲级】1090 Highest Price in Supply Chain (25 分)

    题意: 输入一个正整数N(<=1e5),和两个小数r和f,表示树的结点总数和商品的原价以及每向下一层价格升高的幅度.下一行输入N个结点的父结点,-1表示为根节点.输出最深的叶子结点处购买商品的价 ...

  7. Django ORM中的模糊查询

    ORM映射 什么是ORM映射?在笔者认为就是对SQL语句的封装,所写语句与SQL对应语句含义相同,使开发更加简单方便,不过也是存在弊端的,使程序运行效率下降.例如: UserInfo.objects. ...

  8. Python分析盘点2019全球流行音乐:是哪些歌曲榜单占领了我们?

    写在前面:圣诞刚过,弥留者节日气息的大家是否还在继续学习呐~在匆忙之际也不忘给自己找几首好听的歌曲放松一下,缠绕着音乐一起来看看关于2019年流行音乐趋势是如何用Python分析的吧! 昨天下午没事儿 ...

  9. Deeplearning.ai课程笔记-神经网络和深度学习

    神经网络和深度学习这一块内容与机器学习课程里Week4+5内容差不多. 这篇笔记记录了Week4+5中没有的内容. 参考笔记:深度学习笔记 神经网络和深度学习 结构化数据:如数据库里的数据 非结构化数 ...

  10. Spring Boot 使用 Aop 实现日志全局拦截

    前面的章节我们学习到 Spring Boot Log 日志使用教程 和 Spring Boot 异常处理与全局异常处理,本章我们结合 Aop 面向切面编程来实现全局拦截异常并记录日志. 在 Sprin ...