bzoj 2463: [中山市选2009]谁能赢呢?
我曹,以为是什么什么SG函数,什么神奇的博弈论,我曹,不会啊(雾)
看了一眼题解,短小,直接关掉开始写奇偶。233
1 #include<bits/stdc++.h> 2 #define N 100005 3 #define LL long long 4 #define inf 0x3f3f3f3f 5 #define ls tr[x][0] 6 #define rs tr[x][1] 7 using namespace std; 8 inline int ra() 9 { 10 int x=0,f=1; char ch=getchar(); 11 while (ch<'0' || ch>'9') {if (ch=='-') f=-1; ch=getchar();} 12 while (ch>='0' && ch<='9') {x=x*10+ch-'0'; ch=getchar();} 13 return x*f; 14 } 15 int main() 16 { 17 int n; 18 while (scanf("%d",&n)!=0) 19 { 20 if (!n) break; 21 if (n%2==0) cout<<"Alice"<<endl; 22 else cout<<"Bob"<<endl; 23 } 24 return 0; 25 }