HBC205194Winner题解 (每日一词:thisisthehard)

惰性的成熟 算法基础篇 34 0
全网最全C++题库,助您快速提升编程技能!题库丰富多样,涵盖各个领域,让您在练习中不断成长!
This is the hard version of the problem. The difference is the constraint of n and m.N gamblers circle the round table clockwise. There is a large electronic screen and a large amount of money on the round table. They want to play a game. Before the game starts, the electronic screen will randomly display a positive integer M. they will start counting clockwise from 1, and the person who reports the number m will exit, and then the first person behind him will continue counting from 1, Repeat this until only one left. Then he will win all the money. But this person is a hacker. He has set the number to be displayed on the electronic screen in advance to ensure that he is the winner of the game. Your task is to find the hacker's number.

This is the hard version of the problem. The difference is the constraint of n and m. N gamblers (numbered from 1 to n) circle the round table clockwise. There is a large electronic screen and a large amount of money on the round table. They want to play a game. Before the game starts, the electronic screen will randomly display a positive integer M. they will start counting clockwise from  1, and the person who reports the number m will exit, and then the first person behind him will continue counting from 1, Repeat this until only one left. Then he will win all the money. But this person is a hacker. He has set the number to be displayed on the electronic screen in advance to ensure that he is the winner of the game. Your task is to find the hacker's number.

HBC205194Winner题解
(每日一词:thisisthehard)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断学习,不断挑战,才能在编程领域中脱颖而出!全网最全C++题库,助您成为编程高手!

标签: HBC205194Winner题解