b1ackhand 2023. 6. 5. 10:22
	for (int i = 3; i <= 5000; i++)
	{
		memset(grundycheck, 0, sizeof(grundycheck));
		int t = i - 2;
		for (int j = 0; j <= t; j++)
		{
			grundycheck[grundy[j]^grundy[t - j]] = 1;
		}

		for (int j = 0; j < 20; j++)
		{
			if (!grundycheck[j])
			{
				grundy[i] = j;
				break;
			}
		}

	}​