HBC245396序列终结者A Game of Taking Numbers题解 (rqdmapandhislittlegirlfriend)

八贝勒 算法基础篇 51 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
rqdmap and his little girlfriend are playing a game. There are n positive integers. These two people take turns, taking the numbers. In order to show his Gentlemanliness, rqdmap asked his little girlfriend to take the numbers fifirst. Every time rqdmap’s little girlfriend can choose any number from the remaining numbers to take away , rqdmap needs to choose a number from the remaining numbers , and at least one of the following two conditions is met: 1. |x y| ≤ 3, that is, the difffference between the absolute values of x and y cannot exceed 3. 2. x ≡ y , that is, x and y modulo 3 are congruent. If rqdmap cannot select a qualifified number from the remaining numbers, rqdmap’s little girlfriend wins, otherwise rqdmap wins. rqdmap and his little girlfriend are smart enough. Now that you have obtained these numbers before the game starts, please judge who will win the game in the end.

rqdmap and his little girlfriend are playing a game. There are n positive integers. These two people take turns, taking the numbers. In order to show his Gentlemanliness, rqdmap asked his little girlfriend to take the numbers fifirst. Every time rqdmap’s little girlfriend can choose any number from the remaining numbers to take away (recorded as x), rqdmap needs to choose a number from the remaining numbers (recorded as y), and at least one of the following two conditions is met: 1. |x − y| ≤ 3, that is, the difffference between the absolute values of x and y cannot exceed 3. 2. x ≡ y (mod 3), that is, x and y modulo 3 are congruent. If rqdmap cannot select a qualifified number from the remaining numbers, rqdmap’s little girlfriend wins, otherwise rqdmap wins. rqdmap and his little girlfriend are smart enough. Now that you have obtained these numbers before the game starts, please judge who will win the game in the end.

HBC245396序列终结者A Game of Taking Numbers题解
(rqdmapandhislittlegirlfriend)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断学习,不断挑战,才能在编程领域中脱颖而出!全网最全C++题库,助您成为编程高手!

标签: HBC245396序列终结者A Game of Taking Numbers题解