質問の意味は、3辺のサイズを指定し、4辺のサイズを出力して、4辺が四角形を形成できるようにすることです。
次に、最大のエッジを直接出力します。
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
int t; cin>>t;
while(t--){
int a,b,c; cin>>a>>b>>c;
int ans = max(max(a,b),c);
cout<<ans<<endl;
}
return 0;
}