【题目来源】:https://www.51nod.com/
【题意】
中文题意不解释。。。。
【思路】
模板呀,以及这位大佬的讲解:威佐夫博弈
奇异局势:两个数的差值*(sqrt(5)+1)/2==min(两个数)。
【代码】
#include<cmath>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long LL;
int main()
{
int T;
scanf("%d",&T);
while(T--)
{
int n,m;
scanf("%d%d",&n,&m);
if(n<m) swap(n,m);
int tmp=n-m;
if((int)((double)tmp*(sqrt(5.0)+1.0)/2.0)-m==0)
{
printf("B\n");
}
else printf("A\n");
}
}