summaryrefslogtreecommitdiff
path: root/math/nimm.cpp
blob: 3da6ca1335c0a5b7fc7b8c5d2a2dd528e913cfda (plain)
1
2
3
4
5
6
#Most important function!!
bool WinNimm(vector<int> game) {
	int result = 0;
	for(int s: game) result ^= s;
	return s > 0;
}