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