1011 World Cup Betting (20)

STM32F10xxx_.rar_XXXchinese_chinese xxx_chinesexxx STM32F10xxx_中文参考手册 中文参考手册 立即下载

1011 World Cup Betting (20)
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting fans were putting their money where their mouths were, by laying all manner of World Cup bets.

Chinese Football Lottery provided a “Triple Winning” game. The rule of winning was simple: first select any three of the games. Then for each selected game, bet on one of the three possible results – namely W for win, T for tie, and L for lose. There was an odd assigned to each result. The winner’s odd would be the product of the three odds times 65%.

For example, 3 games’ odds are given as the following:

W T L
1.1 2.5 1.7
1.2 3.0 1.6
4.1 1.2 1.1
To obtain the maximum profit, one must buy W for the 3rd game, T for the 2nd game, and T for the 1st game. If each bet takes 2 yuans, then the maximum profit would be (4.13.02.5*65%-1)*2 = 37.98 yuans (accurate up to 2 decimal places).

Input

Each input file contains one test case. Each case contains the betting information of 3 games. Each game occupies a line with three distinct odds corresponding to W, T and L.

Output

For each test case, print in one line the best bet of each game, and the maximum profit accurate up to 2 decimal places. The characters and the number must be separated by one space.

Sample Input

1.1 2.5 1.7
1.2 3.0 1.6
4.1 1.2 1.1
Sample Output

T T W 37.98

解题思路:
在输入时就判断每一组最大的,输出相应的符号,并且把ans累乘。
输入完成把ans再作处理输出即可。

#include<cstdio>
int main(){
	double ans=1,temp,maxn;
	char change[5]={'W','T','L'};
	int x;
	for(int i=0;i<3;i++){
		maxn=0.0;
		for(int j=0;j<3;j++) {
			scanf("%lf",&temp);
			if(temp>maxn) {
				maxn=temp;	
				x=j	;
			}
		}
		printf("%c ",change[x]);
		ans*=maxn;
	}
	printf("%.2lf",(ans*0.65-1)*2);
	return 0;
}
EEVDF调度算法核心实现解析(一) 本文深入解析Linux kernel 6.6引入的EEVDF调度算法核心实现,详细讲解其基于虚拟截止时间(virtual deadline)的进程挑选机制和红黑树优化设计。通过代码实例展示算法如何平衡系统响应速度与公平性,特别适合需要优化Linux系统性能的开发者参考。 阅读详情

相关推荐

SE-0526激光避障雷达扫描传感器输入输出连线方法及PLC联机实例说明

SE-0526激光避障雷达扫描传感器广泛应用于原材料运输与处理、移动装配、托盘或货架运输、产成品自动运输、生产线自动对接,餐厅自助送餐等AGV小车、服务机器人、仓储机器人、无人叉车导航、避障、定位等。 本文重点介绍SE-0526激光避障雷达扫描传感器输入输出连线方法及PLC联机实例说明。

华翔天诚科技 2695

PAT:A1011 World Cup Betting (20 分)

PAT:A1011 World Cup Betting (20 分) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the ...

Ecloss 610

使用pytorch构建LSTM_AE模型的两种方式

2.基本LSTM_Unit计算——基本LSTM_AE结构 3.自定义LSTM_Unit计算——自定义LSTM_AE结构 1.LSTM-Encoder-Decoder模型结构及简要解析 图基本lstm计算单元

qq_37840762的博客 7275

PAT乙级 1023 组个最小数

#include<iostream> #include<string> #include<map> #include<algorithm> #include<bits/stdc++.h> using namespace std; int main(void){ int n; vector<int> vec; for(int i=0; i<10; i++) { cin>&g.

邹九的个人博客 570

量化投资进阶:Fama-French三因子模型实战解析与Python实现

本文深入解析了Fama-French三因子模型,并提供了完整的Python实战指南。文章阐述了该模型如何通过引入市值因子(SMB)和价值因子(HML),对传统CAPM模型进行重要扩展,以更精准地解释股票收益来源。详细演示了使用Python获取数据、执行回归分析并解读结果(包括关键的阿尔法α)的全过程,并探讨了该模型在量化策略构建、风格诊断和业绩归因中的核心应用。

yog99的博客 1127

Python+whisper/vosk实现语音识别

Whisper 是一个由 OpenAI 开发的人工智能语音识别模型,它能够将语音转换为文本。Whisper 模型特别之处在于它的设计目标是能够理解和转录多种语言的语音,包括但不限于英语。Whisper 模型在训练时使用了大量不同语言的语音数据,这使得它具有很好的跨语言能力。Vosk 是一个开源的语音识别库,它可以在离线环境下工作,不依赖于任何外部服务。Vosk 基于Kaldi语音识别框架,支持多种语言,包括中文。Vosk提供了多种预训练模型,可以根据需求选择适合的模型进行语音识别。

weixin_44458771的博客 5942

1011. World Cup Betting (20)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Sim

accbbbxx的博客 461

【Unity3D框架】GameFramework框架完全教程《全网最全》-专栏文章目录

最近准备学习框架,了解到GameFramework框架是国产Unity3D框架,准备学习一下,但是奈何全网关于这个框架的教程实在太少。为了让自己学习方便一些,也为了让后来者乘凉。将框架以自己的理解整理目录,并且补全教程。觉得教程有帮助别忘了一键三连哦。

优快云博客专家,Unity3D高级软件工程师,《Unity 3D从入门到实战》作者。 2万+

Oracle架构之用户,权限,角色讲解

Oracle用户(user)就是访问oracle数据库的人。通过对用户的各种安全参数进行控制,以维护数据库的安全性,这些概念包括模式(schema)、权限、角色、存储设置、空间限额、存取资源限制、数据库审计等。当用户登录Oracle时需要进行身份认证,以便确认该用户能够进行的操作。认证是指对需要使用数据、资源或应用程序的用户进行身份确认。通过认证后,可以为用户后面的数据库操作提供一种可靠的连接关系。Oracle提供了多种身份认证方式:操作系统身份认证,Oracle 数据库身份认证,管理员身份认证。

上善若泪 3580

UEFI 基础教程 (零) - 目录

UEFI 基础教程 (十八) — UEFI Build Process简单分析。UEFI 基础教程 (十五) — 获取UEFI MemoryMap。UEFI 基础教程 (六)   —  PROTOCOL 简单使用。UEFI 基础教程 (十)   —  FileIO 简单使用。UEFI 基础教程 (一)   —  搭建UEFI开发环境。UEFI 基础教程 (九)   —  EVENT 简单使用。UEFI 基础教程 (七)   —  HOB 简单使用。UEFI 基础教程 (八)   —  PCD 简单使用。..

技术联盟 1537

【网络与爬虫 61】移动端App爬虫终极指南:Android-iOS应用数据提取黑科技全解析

本文全面解析移动端App爬虫技术,涵盖Android和iOS两大平台的数据提取方法。从基础的网络抓包到高级的代码注入,从自动化测试框架到反调试技术绕过,为开发者提供移动端数据采集的完整解决方案和实战经验。

熵数实验室 3029

PAT甲级 1011 World Cup Betting (20 分) 题解

\quad这个题难在题意理解上面,说白了就是给你九个数,三个一组,找出一组中最大的数字并记录下这个数所属类别(W,T,L)。一行是一组。最后把每个组最大的数乘起来,乘0.65,再减去1,最后将所得结果乘2输出。即(max1∗max2∗max3∗0.65−1)∗2(max_1*max_2*max_3*0.65-1)*2(max1​∗max2​∗max3​∗0.65−1)∗2。 #include &...

qq_40438165的博客 1664

《四》:LBE,VR 大空间系列——Pico的空间扫描方式

(这里有个选项叫高精度扫描模式,这个功能在下方详细补充)系统会根据绘制的顶点,将区域分割成若干个4X4米的小方格,我们只需要根据提示,首先进入一个方格子空间内部,然后依次凝视每个区域上下左右前后六个面的小方格组,每一面4个,直至全部消失, 消失后地面会出现一个方形行走路径,我们沿着边缘正或反走一圈即可,完成后此块区域即自动消失。不过由于pico有一个高精度扫描圈,如图加粗的圆环,这个圆环的意思是在在内部的区域扫描精度较高,越远离原点的区域误差越大,所以为了更有效的利用,建议原点设置在场地中心区域。

unitygroup的博客 2887

PAT (Advanced Level) 1011 World Cup Betting (20 分) 【Python/C++】【枚举】

PAT (Advanced Level) 1011 World Cup Betting (20 分) 直接取每一行的最大值就Ok Python: import sys #str_in = input() str_in = input() a = [float(n) for n in str_in.split()] str_in = input() b = [float(n) for n in st...

Irish_Moonshine的博客 376

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

1011 World Cup Betting (20 分)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy(奖杯) in South Afr...

韩江雪de 小屋 746

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

1011 World Cup Betting (20 分)

1011World Cup Betting(20分) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World...

树叶子的博客 473

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

1011 World Cup Betting (20分)

1011World Cup Betting(20分) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World ...

路途遥远,初心难忘,道阻且长,愿君走出半生,归来仍是少年 285

1011 World Cup Betting (20 分)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Si...

Genius_panda_ACM的博客 286

1011 World Cup Betting (20)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Si...

C++养成记 219

1011 World Cup Betting (20 分) Java

1011 World Cup Betting (20 分) Java With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the W...

uu22222的博客 393

PAT甲级 1011 World Cup Betting (20分)

1011 World Cup Betting (20分) 题目链接:PAT A 1011 思路分析:嗯…这道题就很迷,我不知道它那个公式是怎么来的,开始还以为是按照题意,不同的数据对应不同的公式,后来才发现所有数据都是那个公式,但是我不太理解(原谅笨笨的我,大家有明白的别忘了告诉我啊~),但是不影响做题。就是找每行中赔率最大的输出它所对应的的字母,然后用那个公式计算收益就可以了。 AC代码: #...

weixin_43684054的博客 425

1011 World Cup Betting (20 分)

1011 World Cup Betting (20 分) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting

qq_43789349的博客 229

1011 World Cup Betting (20 分)

1011World Cup Betting(20分) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World...

chen_zan_yu_的博客 324
上一篇: 1010 Radix (25)
下一篇: 1012 The Best Rank (25)
ChenyutingZJU
博客等级 码龄10年 18粉丝 248原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值