题意:

给出三组小数,每组三个,分别代表一场比赛下注一块钱胜平负的赔率。输出投注的方案并计算投注两块钱期望收获。(赔率相乘后乘上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. python学习之matplotlib绘制动图(FuncAnimation()参数)

    1.函数FuncAnimation(fig,func,frames,init_func,interval,blit)是绘制动图的主要函数,其参数如下: a.fig 绘制动图的画布名称 b.func自定 ...

  2. 关于windows nginx不能启动问题的解决,史上最坑系列之一(原文)

    我是直接在官方网址下载windows1.6稳定版的nginx,之所以下载它是因为在window下方便学习,更好的在linux安装和学习nginx. 下载到D:\nginx学习\,解压它,并进入启动它 ...

  3. 关于ActiveMq的Exception occurred while processing this request, check the log for more information!问题

    错误原因:jsp渲染的时候报错了.根本原因在于jdk版本和activemq版本的问题. 两种解决方案: 1.把jdk版本改为jdk1.7 2.activeMQ采用5.15,它依赖于jdk1.8

  4. [C/C++] _tprintf() 输出不了汉字

    在前面加一个 setlocale(LC_ALL, ""); //必须得有这行 否则不能输出中文 注意得加locale头文件 #include<stdio.h> #inc ...

  5. SPAN, RSPAN, ERSPAN

    该文档摘自:Home > CCIE Routing and Switching Study Group > Discussions 由 Deben 于 2015-2-6 上午6:50 创建 ...

  6. IoT生态不完善、与智能电视区别不大,荣耀智慧屏概念大于实际

    编辑 | 于斌 出品 | 于见(mpyujian) 前两天,华为荣耀略显"低调"地在北京召开了一场小型的媒体沟通会.在这场沟通会上,荣耀却颇为"重磅"地推出了坊 ...

  7. springmvc实现文件下载

    springmvc实现文件下载 使用springmvc实现文件下载有两种方式,都需要设置response的Content-Disposition为attachment;filename=test2.p ...

  8. python基础(三)---Python基础语法

    1. 注释 1.1 单行注释 语法格式: #[空格]说明性文字信息 添加快捷键: Ctrl+/ 取消快捷键: Ctrl+/ 1.2 多行注释 语法格式: """说明性文字 ...

  9. spark实验(二)--eclipse安装scala环境(2)

    此次在eclipse中的安装参考这篇博客https://blog.csdn.net/lzxlfly/article/details/80728772 Help->Eclipse Marketpl ...

  10. IDEA 设置 自动编译

    转载自:https://www.cnblogs.com/eyesfree/p/9321795.html 设置 File ->Setting ->Compile: 勾选"Make ...