做法:若 lowbit(n)\text{lowbit(n)}lowbit(n) 小于等于 kkk ,则先手胜,否则后手胜。
证明:若 lowbit(n)\text{lowbit(n)}lowbit(n) 小于等于 kkk , 则先手取 lowbit(n)\text{lowbit(n)}lowbit(n) ,之后后手无论取什么数,先手只需重复后手的取数即可。
若 lowbit(n)\text{lowbit(n)}lowbit(n) 大于 kkk , 则先手无论取何数字,取之后的 lowbit(n)\text{lowbit(n)}lowbit(n) 一定小于等于 kkk ,此时后手必胜。
使用您的 Hydro 通用账户