国产探花免费观看_亚洲丰满少妇自慰呻吟_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****************************************************/
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 淮阳县| 建阳市| 河池市| 木里| 海南省| 韩城市| 榆社县| 灌南县| 康马县| 友谊县| 金乡县| 客服| 克什克腾旗| 石柱| 凉山| 屯昌县| 柳江县| 吴江市| 庆安县| 吉木萨尔县| 米易县| 尼玛县| 磐石市| 乌苏市| 五大连池市| 孙吴县| 仲巴县| 重庆市| 肃北| 论坛| 株洲市| 淳化县| 瑞安市| 女性| 沾化县| 九龙县| 连平县| 高邑县| 安阳市| 宁强县| 清远市|