第六届山东省ACM竞赛 C题 Game!
来源:互联网 发布:登山鞋知乎 编辑:程序博客网 时间:2024/04/30 13:30
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
简单博弈,同poj2484
#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;}
0 0
- 第六届山东省ACM竞赛 C题 Game!
- 2015山东省第六届acm省赛 C题Game!
- 第六届山东省ACM竞赛 B题 Lowest Unique Price
- 第六届山东省ACM竞赛 J题 Single Round Math
- 2015山东省第六届ACM省赛 Game!
- Proxy(迪克斯特拉算法,山东省第六届ACM竞赛试题)
- 山东省第六届ACM竞赛 山东理工SDUT3258 Square Number
- 【第六届山东省ACM竞赛】B题 Lowest Unique Price(SDUT3252)
- 第六届山东省ACM竞赛 A题 Nias and Tug-of-War
- 山东省第七届ACM大学生程序设计竞赛 C:Proxy
- 【山东省第六届“浪潮杯”ACM大学生程序设计竞赛】赛后心情贴
- 没有什么不可能—记山东省第六届ACM程序设计竞赛(退役总结帖)
- 山东省第六届ACM竞赛 Lowest Unique Price(set+map)分析,总结
- 山东省第六届ACM大学生程序设计竞赛-Square Number(完全平方数)
- 山东省第六届ACM大学生程序设计竞赛-Lowest Unique Price(桶排序)
- 山东省第六届ACM大学生程序设计竞赛-Single Round Math(大数除法)
- 2015年山东省第六届ACM大学生程序设计竞赛-B-Lowest Unique Price
- SDUT 3258 Square Number(2015年山东省第六届ACM大学生程序设计竞赛)
- 剑指offer之面试题30:最小的k个数
- Android引导页Splash设计
- Codeforces 165B Burning Midnight Oil 【二分】
- android 获取 imei号码 以及其他手机信息
- maven基本概念
- 第六届山东省ACM竞赛 C题 Game!
- js轮播图原理
- “农田灌溉(Farm Irrigation), ZOJ2412”问题的一种解法
- 网页分享链接
- Eclipse构建maven web项目
- 任天堂将在2017年发布新主机Nintendo NX
- 自定义滑动菜单SlidingMenu
- 浅析android应用增量升级
- Codeforces 165C Another Problem on Strings 【二分】