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

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

Game!

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

Think: 在 草稿紙上 演算多次 后 便可得知 只有當 N >= 2 時zbybr才會獲勝 否則 blankcqk獲勝 同時 數值 很大 所以 用 long long int 來定義

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

2 1 2

Example Output

zbybr zbybr

題目大意: 1.A 和 B 輪流取石子 2.每次可以取 1個 或者 相鄰的 2個 石子 3.同時例如 在 1 2 3 4中 當 3 4 被 取走后 1 4不算相鄰

#include<bits/stdc++.h>using namespace std;int main() { long long int T; while(cin >> T) { while(T --) { long long int x; cin >> x; if (x <= 2) cout << "zbybr" <<endl; else cout << "blankcqk" <<endl; }} return 0; }/***************************************************User name: Result: AcceptedTake time: 124msTake Memory: 164KBSubmit time: 2017-02-18 15:42:23****************************************************/
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 花莲县| 横峰县| 肇东市| 宜兴市| 侯马市| 怀远县| 长顺县| 甘泉县| 廉江市| 子长县| 密云县| 平定县| 明光市| 崇文区| 巩留县| 大荔县| 赤峰市| 普格县| 滕州市| 泗洪县| 江阴市| 收藏| 东安县| 公主岭市| 马关县| 淄博市| 霍邱县| 靖江市| 方正县| 安平县| 阿拉善左旗| 肥城市| 黔江区| 毕节市| 嘉禾县| 彩票| 大丰市| 华蓥市| 井陉县| 镇坪县| 黄大仙区|