HBC205076Deploythemedicalteam题解

别敷衍了所有 算法基础篇 57 0
题库丰富多样,涵盖各个领域,全网最全C++题库,让您在练习中不断成长!
The outbreak of the COVID-19 has infected more than 50,000 people in Wuhan and nearly 70,000 people in Hubei province, which brings on great pressure on the local hospital and medical workers. To help the people in Hubei defeating the virus and returning to normal life as soon as possible, many other province deployed their medical teams to Hubei and offered lots of help. Now it's the time for a hospital in Bitland to choose who will be sent to join this great mission. There arennnmedical workers in the hospital ready to deploy and you can send arbitrary numbers of persons to the team. Also, a medical team need a captain in charge of all the work, so once we confirm the people in the team, we need to set one of them as captain too. However, being a captain needs a lot experience, so there are onlymmmpeople capable with the responsibility of a captain. Therefore, A team cannot be made up of people without someone that can be the captain. And here's the question: How many ways are there to pick up a medical team with a captain?

The outbreak of the COVID-19 has infected more than 50,000 people in Wuhan and nearly 70,000 people in Hubei province, which brings on great pressure on the local hospital and medical workers. To help the people in Hubei defeating the virus and returning to normal life as soon as possible, many other province deployed their medical teams to Hubei and offered lots of help. Now it's the time for a hospital in Bitland to choose who will be sent to join this great mission. There are nnn medical workers in the hospital ready to deploy and you can send arbitrary numbers of persons to the team. Also, a medical team need a captain in charge of all the work, so once we confirm the people in the team, we need to set one of them as captain too. However, being a captain needs a lot experience, so there are only mmm people capable with the responsibility of a captain. Therefore, A team cannot be made up of people without someone that can be the captain. And here's the question: How many ways are there to pick up a medical team with a captain? Notice that two teams are consider different as long as they have different participants or have different captain. Also, due to the large memory of Bitland, the number of workers in hospital can be as large as 10910^9109! And that means your answer can be very large, so please output the result of the answer modulo 109+710^9+7109+7.

HBC205076Deploythemedicalteam题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
全网最全C++题库,助您挑战自我,突破极限,成为编程领域的佼佼者!

标签: HBC205076Deploythemedicalteam题解