[NIM博弈变形] A在部分堆中只能取奇数 另一部分只能取偶数 B任取 ZOJ3964

这篇博客介绍了一个名为'Yet Another Game of Stones'的博弈问题,规则是Alice和Bob轮流从石堆中取石子。Alice受约束,只能在特定条件下取石子:bi=1时只能取奇数,bi=2时只能取偶数,而Bob没有限制。如果无法再进行有效移动的玩家将输掉游戏。博客提供了输入输出格式,并包含若干样例分析,讨论了如何判断哪位玩家会赢得比赛。
摘要由CSDN通过智能技术生成

G - Yet Another Game of Stones

 ZOJ - 3964 

Alice and Bob are playing yet another game of stones. The rules of this game are as follow:

  • The game starts with n piles of stones indexed from 1 to n. The i-th pile contains ai stones and a special constraint indicated as bi.
  • The players make their moves alternatively. The allowable moves for the two players are different.
  • An allowable move of Bob is considered as removal of some positive number of stones from a pile.
  • An allowable move of Alice is also considered as removal of some positive number of stones from a pile, but is limited by the constraint bi of that pile.
    • If bi = 0, there are no constraints.
    • If bi = 1, Alice can only remove some odd number of stones from th
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值