PAT (Advanced Level) 1011. World Cup Betting (20)
简单题。
#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<cstdio>
using namespace std; double a[][],Max[];
double ans=; int main()
{
for(int i=;i<=;i++)
for(int j=;j<=;j++) scanf("%lf",&a[i][j]);
Max[]=max(a[][],max(a[][],a[][]));
Max[]=max(a[][],max(a[][],a[][]));
Max[]=max(a[][],max(a[][],a[][])); for(int i=;i<=;i++)
{
for(int j=;j<=;j++)
{
if(a[i][j]==Max[i])
{
if(j==) printf("W ");
else if(j==) printf("T ");
else if(j==) printf("L "); ans=ans*Max[i];
break;
}
}
}
printf("%.2lf\n",(ans*0.65-)*);
return ;
}
PAT (Advanced Level) 1011. World Cup Betting (20)的更多相关文章
- PTA(Advanced Level)1011.World Cup Betting
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...
- 【PAT甲级】1011 World Cup Betting (20 分)
题意: 给出三组小数,每组三个,分别代表一场比赛下注一块钱胜平负的赔率.输出投注的方案并计算投注两块钱期望收获.(赔率相乘后乘上0.65再减去本金2块钱) AAAAAccepted code: #in ...
- 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 ...
- 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 ...
- PAT 甲级 1011 World Cup Betting (20)(代码+思路)
1011 World Cup Betting (20)(20 分) With the 2010 FIFA World Cup running, football fans the world over ...
- 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 ...
- 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 ...
- PAT (Advanced Level) Practice 1041 Be Unique (20 分) 凌宸1642
PAT (Advanced Level) Practice 1041 Be Unique (20 分) 凌宸1642 题目描述: Being unique is so important to peo ...
- PATA 1011 World Cup Betting (20)
1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Wit ...
随机推荐
- 在Linux服务器上增加硬盘没那么简单【转】
运维案例:HP服务器,LINUX系统在保障数据的前提下扩展/home分区 部门需求:研发部门提出需要在现有的服务器上扩容磁盘空间,以满足开发环境的磁盘需求.现有空间1.6T需要增加到2T. 需求调查分 ...
- 硬盘安装win8系统方法汇总
从硬盘安装 (推荐)硬盘安装方法一 使用Nt6 hdd installer进行安装,此方法适合XP,vista, Windows 7等系统. 下载Nt6 hdd installer(Win8硬盘安装工 ...
- Qt学习之系列[9] – QCoreApplication:processEvents()可能会引起递归,导致栈溢出崩溃
api含义:QCoreApplication::processEvents() 将处理所有事件队列中的事件并返回给调用者. 问题描述: 当主线程在某个槽函数里正在执行processEvents时, 刚 ...
- RichTextEditor 文本编辑
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- tomcat连接数设置
如何加大tomcat连接数 在tomcat配置文件server.xml中的<Connector ... />配置中,和连接数相关的参数有:minProcessors:最小空闲连接线程数,用 ...
- J2EE判断重复的数据
import java.util.ArrayList; import java.util.List; import org.junit.Test; /** * 判断重复的数据 * @author Ya ...
- JAVA-面向对象2--继承
1. 继承的好处: 1.提高代码复用性. 2.让类与类之间产生关系,为面向对象的第三大特征 多态 提供了前提 2.java中支持单继承,不直接支持多继承,但对c++中多继承进行了改良.java通过多实 ...
- Arch: Configurations
the original purpose is to show the steps needed to setup i3 in vbox.. easy. alright, it is a bit mi ...
- keepalived: Compile & startup
first get keepalived source from git: git clone https://github.com/acassen/keepalived then unzip and ...
- 添加一个Application Framework Service
如何添加一个Application Framework Service(without native code)? 1.本文参照AlarmManagerService实现一个简单的Applicatio ...