当前位置:网站首页>English topic assignment (25)
English topic assignment (25)
2022-07-06 19:03:00 【m0_ sixty-five million seven hundred and eighty-eight thousand 】
The original title is :
So you want to be a 2n-aire?
1000ms 32768K
describe :
The player starts with a prize of $$$1, and is asked a sequence of n questions. For each question, he may
quit and keep his prize.
answer the question. If wrong, he quits with nothing. If correct, the prize is doubled, and he continues with the next question.
After the last question, he quits with his prize. The player wants to maximize his expected prize.
Once each question is asked, the player is able to assess the probability p that he will be able to answer it. For each question, we assume that p is a random variable uniformly distributed over the range t .. 1.
Input :
Input is a number of lines, each with two numbers: an integer 1 ≤ n ≤ 30, and a real 0 ≤ t ≤ 1. Input is terminated by a line containing 0 0. This line should not be processed.
Output :
For each input n and t, print the player's expected prize, if he plays the best strategy. Output should be rounded to three fractional digits.
The sample input :
1 0.5 1 0.3 2 0.6 24 0.25 0 0
Sample output :
1.500 1.357 2.560 230.138
( link :So you want to be a 2n-aire? | JXNUOJ)
translate :
Participants can get $$$1 As a bonus , And be asked n A question . For every question , He can quit or stay for his bonus .
Question answering , If it's wrong , Nothing will happen if you quit ; If you're right , Double the bonus , And he can continue to answer the next question .
After the last question , He can quit with his bonus . This contestant wants to get the most prize .
For every question asked , The contestant can estimate the possibility that he can answer p. For each problem, we assume p It is randomly and evenly distributed in the range t···1.
Input :
There are many lines of input , A row contains two numbers : An integer 1<=n<=30, A real number 0<=t<=1. When a line is entered as 0 0 when , Input termination .
Output :
For each input n and t, Output contestants to give full play to their strength , Expected bonus . Output reserved 3 Decimal place .
边栏推荐
- Crawling data encounters single point login problem
- Test 123
- Collection of penetration test information -- use with nmap and other tools
- R language ggplot2 visualization: use the ggdotplot function of ggpubr package to visualize dot plot, set the palette parameter, and set the colors of data points and box graphs of dot plots at differ
- QLabel 跑马灯文字显示
- 关于npm install 报错问题 error 1
- AvL树的实现
- 包装行业商业供应链管理平台解决方案:布局智慧供应体系,数字化整合包装行业供应链
- Pychrm Community Edition calls matplotlib pyplot. Solution of imshow() function image not popping up
- R语言ggplot2可视化时间序列柱形图:通过双色渐变配色颜色主题可视化时间序列柱形图
猜你喜欢

pychrm社区版调用matplotlib.pyplot.imshow()函数图像不弹出的解决方法

涂鸦智能在香港双重主板上市:市值112亿港元 年营收3亿美元

Introduction to the use of SAP Fiori application index tool and SAP Fiori tools

2022-2024年CIFAR Azrieli全球学者名单公布,18位青年学者加入6个研究项目

Visual Studio Code启动时提示“Code安装似乎损坏。请重新安装。”、标题栏显示“不受支持”信息的解决办法

Video based full link Intelligent Cloud? This article explains in detail what Alibaba cloud video cloud "intelligent media production" is

Collection of penetration test information -- use with nmap and other tools
![Airiot IOT platform enables the container industry to build [welding station information monitoring system]](/img/52/88e3c7b7a60867282921d9bb5c96da.jpg)
Airiot IOT platform enables the container industry to build [welding station information monitoring system]

The role of applet in industrial Internet

星诺奇科技IPO被终止:曾拟募资3.5亿元 年营收3.67亿
随机推荐
AIRIOT物联网平台赋能集装箱行业构建【焊接工位信息监控系统】
人体骨骼点检测:自顶向下(部分理论)
上海部分招工市场对新冠阳性康复者拒绝招录
如何提高网站权重
一种用于夜间和无袖测量血压手臂可穿戴设备【翻译】
渲大师携手向日葵,远控赋能云渲染及GPU算力服务
Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
AcWing 3537.树查找 完全二叉树
[depth first search] Ji suanke: Square
Implementation of AVL tree
QPushButton绑定快捷键的注意事项
Specify flume introduction, installation and configuration
QLabel 跑马灯文字显示
Penetration test information collection - site architecture and construction
SQL injection Foundation
Helm deploy etcd cluster
根据PPG估算血压利用频谱谱-时间深度神经网络【翻】
Crawling data encounters single point login problem
美庐生物IPO被终止:年营收3.85亿 陈林为实控人
Oracle advanced (IV) table connection explanation