国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

Game!

2019-11-08 02:44:50
字體:
來源:轉載
供稿:網友

Game!

Time Limit: 1000MS Memory Limit: 65536KB

PRoblem Description

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?

 

Input

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 ≤ 10^18).

 

Output

Output the name of the winner.

Example Input

212

Example Output

zbybrzbybr

Hint

Author

題目大意:

             石子圍成一圈,zbybr和blankcqk輪流取石子,每人可以一次取一個,也可以取相鄰的兩個。zbybr先開始。

think:

         這是一道簡單的博弈論問題(還是英文問題哦),可以試著推演一下,就可以知道結果。

         我在比賽時,開始就推三個的情況(1, 2的情況已給),然后一直推到了7,發現之后都是blankcpy贏,然后又回來看了一下,理了理思路,就可以了。

代碼實現:

#include<stdio.h>#include<string.h>int main(){  int t;  long long int a;  scanf("%d", &t);  while(t--)  {    scanf("%lld", &a);    if(a==1||a==2)    printf("zbybr/n");    else    printf("blankcqk/n");  }   return 0;}


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 广丰县| 巴林左旗| 孟连| 宿迁市| 册亨县| 启东市| 丹阳市| 崇州市| 临夏市| 顺平县| 女性| 屯门区| 河北区| 尉犁县| 宁夏| 秭归县| 从江县| 大余县| 南和县| 凤庆县| 南通市| 公安县| 峨眉山市| 新郑市| 威宁| 宁陵县| 西贡区| 万年县| 琼海市| 西乡县| 本溪| 寿阳县| 霍林郭勒市| 南昌市| 上饶市| 永济市| 星子县| 砚山县| 托克托县| 房产| 叙永县|