-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA. Minimal Square.cpp
More file actions
57 lines (44 loc) · 1.17 KB
/
A. Minimal Square.cpp
File metadata and controls
57 lines (44 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair <int,int> pii;
typedef pair <ll,ll> pll;
///#define ff first
///#define ss second
///#define pb push_back
///#define all(v) v.begin(),v.end()
///#define D(x) cerr << #x " = " << x << '\n'
///#define DBG cerr << "Hi!" << '\n'
///#define CLR(a) memset(a,0,sizeof(a))
///#define SET(a) memset(a,-1,sizeof(a))
///#define nn "\n"
///#define gcd(a,b) __gcd(a,b)
///#define lcm(a,b) (a*b)/gcd(a,b)
///#define pi acos(-1.0)
///#define inf 2e9+10
//const double pi = acos(-1.0);
//const double eps = 1e-8;
void solve(){
int t;
cin>>t;
while(t--){
int a,b;
cin>>a>>b;
if(a<b) swap(a,b);
if((b+b)<a){
cout<<a*a<<"\n";
}else{
int x=b+b;
cout<<x*x<<"\n";
}
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
//freopen("in.txt", "r", stdin);
solve();
return 0;
}