http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3333
比大小
#include<iostream>
#include<cstdio>
#include<set>
#include<string>
#include<string.h>
#include<cstring>
#include<vector>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<algorithm>
#include<sstream>
#include<utility>
#include<cmath>
#define mt(a) memset(a,0,sizeof (a))
#define fl(a,b,c) fill(a,b,c)
#define SWAP(a,b,t) (t=a,a=b,b=t)
#define inf 1000000000+7
using namespace std;
int main()
{
int T;
cin >> T;
while (T--)
{
int p, p1, p2;
cin >> p >> p1 >> p2;
char flag = ((abs(p - p1) > abs(p - p2)) ? 'B' : 'A');
printf("%c\n", flag);
}
return 0;
}