标签:
# include <cstdio> # include <cstring> # include <iostream> using namespace std; int sg[1200]; int get(int x) { if(x < 0) return 0; if(sg[x] != -1) return sg[x]; int mex[1200] = {0}; for(int i = 0;i < x;i++){ int t = get(i)^get(x-i - 1)^get(i-1)^get(x - i -2); mex[t] = 1; } for(int i = 0;;i++) if(!mex[i]) return sg[x] = i; } int main() { //freopen("a.txt","r",stdin); //freopen("b.txt","r",stdin); int t; memset(sg,-1,sizeof(sg)); scanf("%d",&t); while(t--){ int n; scanf("%d",&n); if(n <= 2){ printf("zbybr\n"); continue; } if(get(n - 1) || get(n - 2)) printf("blankcqk\n"); else printf("zbybr\n"); } return 0; }
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/rechard_chen/article/details/47606483