第六届山东省ACM竞赛 C题 Game!
2016-05-07 14:30
232 查看
Game!
Time Limit: 1000MS Memory limit: 65536K
题目描述
One day, zbybr is playing a game with blankcqk, here are the rules of the game:There is a circle of N stones, zbybr and blankcqk take turns taking the stones.
Each time, one player can choose to take one stone or take two adjacent stones.
You should notice that if there are 4 stones, and zbybr takes the 2nd, the 1st and 3rd stones are still not adjacent.
The winner is the one who takes the last stone.
Now, the game begins and zbybr moves first.
If both of them will play with the best strategy, can you tell me who will win the game?
输入
The first line of input contains an integer T, indicating the number of test cases (T≈100000).For each case, there is a positive integer N (N ≤ 1018).
输出
Output the name of the winner.示例输入
2
1
2
示例输出
zbybr
zbybr
#include <cstdio> using namespace std; typedef long long ll; int t; ll n; int main() { scanf("%d", &t); while (t--){ scanf("%lld", &n); if (n <= 2){ printf("zbybr\n"); } else printf("blankcqk\n"); } return 0; }
相关文章推荐
- 浅析android应用增量升级
- Android 框架
- 任天堂将在2017年发布新主机Nintendo NX
- 请说出作用域public,private,protected,以及不写时的区别
- 自定义滑动菜单SlidingMenu
- RE的原因
- Android 小的知识片
- linux双网卡绑定+单网卡多IP绑定
- C++统计字符出现的次数并输出
- js轮播图原理
- 网页分享链接
- android 获取 imei号码 以及其他手机信息
- maven基本概念
- Android引导页Splash设计
- 分页语句-取出sql表中第31到40的记录(以自动增长ID为主键)
- 剑指offer之面试题30:最小的k个数
- 第六届山东省ACM竞赛 A题 Nias and Tug-of-War
- Android获取手机的型号和系统版本
- Cmockery macro demo hacking
- Win8系统通过Web凭据找回账户密码的方法