标签:str space nbsp txt using include div 链接 打开
# 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; }
标签:str space nbsp txt using include div 链接 打开
原文地址:http://www.cnblogs.com/yxysuanfa/p/7323319.html