国产探花免费观看_亚洲丰满少妇自慰呻吟_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;}


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 安义县| 岳池县| 浦县| 小金县| 共和县| 修文县| 山阴县| 靖州| 旬邑县| 红原县| 北川| 平原县| 常山县| 和田市| 库伦旗| 乌审旗| 肥东县| 全州县| 宕昌县| 南投市| 宁蒗| 观塘区| 杭锦旗| 麻阳| 福泉市| 名山县| 仁化县| 高青县| 漠河县| 奇台县| 安徽省| 寿宁县| 墨脱县| 岳西县| 余庆县| 井冈山市| 汕尾市| 栾川县| 汉源县| 静安区| 肃北|