请选择 进入手机版 | 继续访问电脑版

湖南大学第十四届ACM程序设计新生杯(重现赛)I:II play with GG(博弈论|

[复制链接]
密战 发表于 2021-1-1 10:29:52 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
链接:https://ac.nowcoder.com/acm/contest/338/I
泉源:牛客网
题目形貌

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

  • Move the piece to the left by one space (from (x, y) to (x-1, y)).
  • Move the piece down one space (from (x, y) to (x, y-1)).
  • 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).
输入形貌:


The input contains only one line. Enter two integers x y to represent the initial coordinates of the piece. (0n>>m;    if((n&1)||(m&1))        cout
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

发布主题

专注素材教程免费分享
全国免费热线电话

18768367769

周一至周日9:00-23:00

反馈建议

27428564@qq.com 在线QQ咨询

扫描二维码关注我们

Powered by Discuz! X3.4© 2001-2013 Comsenz Inc.( 蜀ICP备2021001884号-1 )