dfs (a - 1,b)) return t = 1; else if (a && b && !dfs (a - 1,b + 1)) return t = 1; else if (a > 1 && !dfs (a - 2,b + 2 + (b ? 1 : 0))) return t = 1; else if (b && !dfs (a,b - 1)) return t = 1; else return t = 0; } signed main(){...
ans^=dfs(cnt); }printf(ans!=0?"Alice\n":"Bob\n"); }return0; }
vis[i]) dfs(i),ans^=sg[i]; // for(int i=1;i<=n;i++) write(i),write(" : "),write(sg[i]),EN; write(ans?"Alice\n":"Bob\n"); } return SUC_RETURN; } 分类: 题解-洛谷 , 数论数学-博弈论 , 数据结构-trie 好文要顶 关注我 收藏该文 微信分享 suxxsfe 粉丝- 40 关注- ...