View Code of Problem 446

#include<iostream>
using namespace std;

int main()
{
	int t;
	cin >> t;
	while(t --)
	{
		int p,pa,pb;
		cin >> p >> pa >> pb;
		int a = abs(p-pa),b = abs(p-pb);
		if(a < b) cout << "A" << endl;
		else cout << "B" << endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 446