HBC252843[NOIP2018]货币系统,背包问题,动态规划Love Choice题解

云中君 算法基础篇 55 0
题库丰富多样,涵盖各个领域,全网最全C++题库,让您在练习中不断成长!
In order to perform better in a romantic relationship with Eva, Colin studies hard by playing LoveChoice on Steam. To simplify the problem, we describe it as follows:. normal choices. In addition, some questions have another hidden choice. There is only one correct choice for each question, and if there is a hidden choice for this question, the hidden choice must be the correct choice.In a round of game, you must answer all the questions in order. After answering all the questions, the system will tell you if each questionis answered correctly.Colin is calm enough. For each question, he will only choose one of the choices that may not be the wrong choice with equal probability each time. However, Colin's observation ability is relatively ordinary, so if a question has a hidden choice, Colin will only find out that there is a hidden choice after knowing that all the. Colin is hardworking. His goal is to answer all questions correctly in a round. Please calculate the expected number of rounds for him to answer all the questions correctlyfor the first time.

It’s the beginning of a new relationship. Will this one result in joy or sorrow? In LoveChoice, you choose the actions that determine how the relationship unfolds. Pick your responses to each of the situations. These endearing and bittersweet stories are surprisingly realistic and easy to relate to. In order to perform better in a romantic relationship with Eva, Colin studies hard by playing LoveChoice on Steam. To simplify the problem, we describe it as follows: There are n n multiple-choice questions, the i i-th question has a_i a i ​ normal choices. In addition, some questions have another hidden choice. There is only one correct choice for each question, and if there is a hidden choice for this question, the hidden choice must be the correct choice. In a round of game, you must answer all the questions in order. After answering all the questions, the system will tell you if each question is answered correctly. Colin is calm enough. For each question, he will only choose one of the choices that may not be the wrong choice with equal probability each time. However, Colin's observation ability is relatively ordinary, so if a question has a hidden choice, Colin will only find out that there is a hidden choice after knowing that all the a_i a i ​ normal choices for this question are wrong. Colin is hardworking. His goal is to answer all questions correctly in a round. Please calculate the expected number of rounds for him to answer all the questions correctly for the first time.

HBC252843[NOIP2018]货币系统,背包问题,动态规划Love Choice题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
全网最全C++题库,助您挑战自我,突破极限,成为编程领域的佼佼者!

标签: HBC252843[NOIP2018]货币系统 背包问题 动态规划Love Choice题解