首页 > 代码库 > hdu5882 Balanced Game

hdu5882 Balanced Game

题目链接:hdu5882 Balanced Game

题解:每种手势的攻防数一样,不难想到n为奇数时游戏平衡。

技术分享
 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5  6 int main(){ 7     int t, x; 8     scanf("%d", &t); 9     while(t--){10         scanf("%d", &x);11         if(x & 1) puts("Balanced");12         else  puts("Bad");13     }14     return 0;15 }
View Code

 

hdu5882 Balanced Game