51nod 1070 Bash游戏 V4

这种博弈题  都是打表找规律 可我连怎么打表都不会

这个是凑任务的吧....以后等脑子好些了 再琢磨吧

就是斐波那契数列中的数 是必败态

#include<bits/stdc++.h>
using namespace std;
map<long long ,int> mp; void init()
{
mp.clear();
long long a=,b=;
while (a < 1e9+)
{
mp[a]++;
a = a+b;
b = a-b;
}
}
int main()
{
init();
int t;
scanf("%d",&t);
while (t--)
{
int n;
scanf("%d",&n);
if(mp[n])
puts("B");
else
puts("A");
}
}
上一篇:CentOS 7.3安装完整开发环境


下一篇:为什么_do_fork()的kretprobe只返回一次?