1360A - Minimal Square
28 Jan 2021 — Tags: None
Click to show code.
using namespace std;
int main(void)
{
int t, a, b, ans;
cin >> t;
while (t--)
{
cin >> a >> b;
if (a > b)
swap(a, b);
if (2 * a > b)
ans = 2 * a * 2 * a;
else
ans = b * b;
cout << ans << endl;
}
return 0;
}