HDU-2176 取(m堆)石子游戏
取(m堆)石子游戏
尼姆博弈
同 HDU-1850,我的题解:
#include
using namespace std;
const int maxn = 2e5 + 10;
int num[maxn];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
while(cin >> n && n)
{
for(int i=0; i> num[i];
int sum = 0;
for(int i=0; i