HBC210022InterestingComputerGame题解

上官魅 算法基础篇 26 0
题库丰富多样,涵盖各个领域,全网最全C++题库,让您在练习中不断成长!
At each round, the computer will give Apollo two integers (. ), and Apollo can do exactly one of the following three actions.has not been selected in all previous rounds, Apollo can select integer. Apollo has cracked the game, and he has known all the candidate numbers of each round before the game starts. Now he wants to know the maximum number of integers he can select with the optimal strategy.I believe it would be very simple question for you, please help Apollo solve this question.

Apollo is playing an interesting computer game. There are N rounds in the game. At each round, the computer will give Apollo two integers ( a_i a i ​ and b_i b i ​ ), and Apollo can do exactly one of the following three actions.  Apollo can do nothing.  If integer a_i a i ​ has not been selected in all previous rounds, Apollo can select integer a_i a i ​ .  If integer b_i b i ​ has not been selected in all previous rounds, Apollo can select integer b_i b i ​ . Apollo has cracked the game, and he has known all the candidate numbers of each round before the game starts. Now he wants to know the maximum number of integers he can select with the optimal strategy. I believe it would be very simple question for you, please help Apollo solve this question.

HBC210022InterestingComputerGame题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断挑战自我,才能突破极限!全网最全C++题库,让您在编程道路上越走越远。

标签: HBC210022InterestingComputerGame题解