51Nod 1067 Bash游戏 V2 | 博弈论 Bash

 

 

n的数据范围非常大,所以不能用标准SG函数

找规律

 

#include "iostream"
#include "cstdio"
using namespace std;
#define LL long long
#define N 100020
char *s="BABAAAA";

int main()
{
    int T,n;
    cin>>T;
    while(T--){
        cin>>n;
        cout<<s[n%7]<<endl;
    }
    return 0;
}

 

posted @ 2017-09-05 15:23  kimsimple  阅读(193)  评论(0编辑  收藏  举报