
sg函数
lqybzx
123
展开
-
bzoj 1874: [BeiJing2009 WinterCamp]取石子游戏
Description 小H和小Z正在玩一个取石子游戏。 取石子游戏的规则是这样的,每个人每次可以从一堆石子中取出若干个石子,每次取石子的个数有限制,谁不能取石子时就会输掉游戏。 小H先进行操作,他想问你他是否有必胜策略,如果有,第一步如何取石子。 Input 输入文件的第一行为石子的堆数N 接下来N行,每行一个数Ai,表示每堆石子的个数 接下来一行为每次取石子个数的种类数M 接下来原创 2015-04-13 21:07:26 · 685 阅读 · 0 评论 -
2016多校训练Contest6: 1003 A Simple Nim hdu5795
Problem Description Two players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn they can pick any number of candies which come from the same原创 2016-08-04 23:57:21 · 363 阅读 · 0 评论