标签:
1 class Solution { 2 public: 3 bool canWinNim(int n) { 4 if(n <= 3) return true; 5 else { 6 //return !canWinNim(n-1) || ! canWinNim(n-2) || ! canWinNim(n-3); 7 if (n % 4 == 0) return false; 8 else return true; 9 } 10 } 11 };
标签:
原文地址:http://www.cnblogs.com/shadowwalker9/p/5751448.html