题意:

给出三组小数,每组三个,分别代表一场比赛下注一块钱胜平负的赔率。输出投注的方案并计算投注两块钱期望收获。(赔率相乘后乘上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. OracleDBConsoleorcl 服务无法启动:Agent process exited abnormally during initialization.

    OracleDBConsoleorcl 服务无法启动 在事件查看器里看到 Agent process exited abnormally during initialization.的记录.知道是因为 ...

  2. queue的使用-Hdu 1702

    ACboy needs your help again! Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K ( ...

  3. 6_15 给任务排序(UVa10305)<拓扑排序>

    John有n件事情要做,不幸的是这些事情并不是各自独立的,而是有相依性的.换句话说可能有某件事情一定要在另一件事情做完之后才能做.Input每组测试数据可能有好几列.第一列有2个整数n,m.(1 &l ...

  4. 【应急响应】Windows 安全加固

    一.补丁管理 运行cmd,输入systeminfo查看目前补丁信息 二.账户管理 gpedit.msc —>Windows设置—>安全设置—>本地设置—>账户设置 密码策略: ...

  5. php substr的一些用法

    //去掉最后一个字符$str = "1,2,3,4,5,6,"; $newstr = substr($str,0,strlen($str)-1); echo $newstr; ub ...

  6. 【代码学习】PYTHON 异常处理

    一.什么是异常 在程序执行过程中可能会影响程序的正常执行,一般情况下,在python无法正常处理程序时就会发生一个异常 当python脚本发生异常时我们需要捕获处理他,否则程序会终止执行 二.异常处理 ...

  7. 【代码审计】MenInfo文件包含漏洞

    代码审计是我之前一直不敢涉及的领域,它包含的知识面太广.最近才开始学习,前段时间写的第一篇代码审计的文章 更多的感觉像是一个黑盒测试.我也会尽量把文章写的通俗易懂.代码审计 0基础从大牛的蜕变 从这里 ...

  8. cssdiv设置高宽百分比不起作用的问题

    div等元素设置宽高百分比都是基于包含他的块级对象的百分比高度,所以必须先设置包含它的块级对象高度与宽度,但是光设置body是不起作用的,必须同时设置html和body.   要使用百分比设置div宽 ...

  9. 23 JavaScript规范与最佳实践&性能&箭头函数

    大多数web服务器(Apache等)对大小写敏感,因此命名注意大小写 不要声明字符串.数字和布尔值,始终把他们看做原始值而非对象,如果把这些声明为对象,会拖慢执行速度 对象是无法比较的,原始值可以 不 ...

  10. 关于vscode的配置

    Git插件 通过GitLens -- Git supercharged可以很方便的查看历史作者 Setting.json(谨慎使用,因为对import进行排序改变后可能导致类的循环引用,因此不要轻易改 ...