#include <bits/stdc++.h>
using namespace std;
#define int long long int
const int mod = 1e9 + 7 ;
main( )
{
ios_base:: sync_with_stdio ( 0 ) ;
cin .tie ( 0 ) ;
cout .tie ( 0 ) ;
int t;
cin >> t;
while ( t-- )
{
int x, y, z;
cin >> x>> y>> z;
cout << int ( ceil ( sqrt ( min( ( x+ y) * ( x+ y) + z* z, min( ( x+ z) * ( x+ z) + y* y, ( y+ z) * ( y+ z) + x* x) ) ) ) ) << endl;
}
return 0 ;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgaW50IGxvbmcgbG9uZyBpbnQKIApjb25zdCBpbnQgbW9kID0gMWU5Kzc7CiAKbWFpbigpCnsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oMCk7CiAgICBjaW4udGllKDApOwogICAgY291dC50aWUoMCk7CiAgICAKICAgIGludCB0OwogICAgY2luPj50OwogICAgd2hpbGUodC0tKQogICAgewogICAgICAgIGludCB4LCB5LCB6OwogICAgICAgIGNpbj4+eD4+eT4+ejsKICAgICAgICBjb3V0PDxpbnQoY2VpbChzcXJ0KG1pbigoeCt5KSooeCt5KSt6KnosIG1pbigoeCt6KSooeCt6KSt5KnksICh5K3opKih5K3opK3gqeCkpKSkpPDxlbmRsOwogICAgfQoKICAgIHJldHVybiAwOwp9IAo=
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:3:13: error: expected primary-expression before ‘long’
#define int long long int
^
prog.cpp:19:15: note: in expansion of macro ‘int’
cout<<int(ceil(sqrt(min((x+y)*(x+y)+z*z, min((x+z)*(x+z)+y*y, (y+z)*(y+z)+x*x)))))<<endl;
^~~
stdout