HBC21299II play with GG题解

旧巴黎 算法基础篇 58 0
全网最全C++题库,助您快速提升编程技能!题库丰富多样,涵盖各个领域,让您在练习中不断成长!
IG won the S championship and many people are excited, ii and gg are no exception. After watching the game, the two of them also want to play a game.There is now an infinite chessboard with only one piece. Initially the pieces are placed at the position . They took turns to move the pieces. ii moves first.It should be noted that the pieces cannot be removed from the board.The first person who can not operate is judged negative .Now give the initial coordinates x, y of the piece. Under the premise that both take the optimal strategy, please output the name of the winner .

IG won the S championship and many people are excited, ii and gg are no exception. After watching the game, the two of them also want to play a game. There is now an infinite chessboard with only one piece. Initially the pieces are placed at the (x, y) position (the board coordinates are counted from 0). They took turns to move the pieces. ii moves first. There are three ways to move 1. Move the piece to the left by one space (from (x, y) to (x-1, y)). 2. Move the piece down one space (from (x, y) to (x, y-1)). 3. Move the piece to the lower left by one space (from (x, y) to (x-1, y-1)). It should be noted that the pieces cannot be removed from the board. The first  person who can not operate is judged negative (in other words, the first person who moves the piece to (0,0) wins). Now give the initial coordinates x, y of the piece. Under the premise that both take the optimal strategy, please output the name of the winner (ii or gg).

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

标签: HBC21299II play with GG题解