1920. Divide The Stones
2013-01-08 23:11
459 查看
//a pile of n stones can be divided by n-1 times
#include<iostream> #include<cstdio> using namespace std; int main(){ int t; scanf("%d",&t); while(t--){ int n; int sum = 0; int num; scanf("%d",&n); while( n-- ){ scanf("%d",&num); sum += (num-1)%2; } if (sum%2==1) cout<<"Alice"<<endl; else cout<<"Bob"<<endl; } return 0; }
相关文章推荐
- Sicily 1920 Divide The Stones
- 1920. Divide The Stones
- 2016 Multi-University Training Contest 5 1003 Divide the Sequence (贪心)
- hdu 5783 Divide the Sequence 贪心
- hdu 5783 Divide the Sequence 贪心
- UVa 10256 The Great Divide,判断两个凸包是否相离
- codeforces 266A Stones on the Table(模拟水题)
- hdu 5783 Divide the Sequence
- 【HDU】5783 Divide the Sequence
- HDU 5783 Divide the Sequence 思维题
- GYM 100090 H.Game with the Stones(博弈论)
- HDU 5783 Divide the Sequence
- 分治法——主定理(Divide and Conquer - The Master Theorem)
- HDU - 5783 Divide the Sequence
- UVA 10256 The Great Divide 凸包 .
- Codeforces Round #163 (Div. 2) A. Stones on the Table
- UVa 10256 - The Great Divide 判断凸包相交
- Stones on the Table
- Ural 1087|The Time to Take Stones|博弈论|动态规划
- hdu 4573 Throw the Stones