No I’ m not taking x1,y1 to the left thing.just wanted to ask suppose we have L1= (1,10),(2,9),
L2=(3,8),(4,7).
Now MBR can be thin rectangle of tending to 0 area connecting (1,10) and (4,7) or am i missing something??.

Here 's the code.
#include<iostream>
using namespace std;
int main()
{
int t,n;char type;
cin>>t;
int x1,x2,y1,y2,r,lx{1000},ly{1000},rx{-1000},ry{-1000};
for(int j=0;j<t;j++)
{
cin>>n;
for(int i=0;i<n;i++)
{
cin>>type;
if(type=='l')
{
cin>>x1>>y1>>x2>>y2;
if(x1>rx) rx=x1;
if(x2>rx) rx=x2;
if(x1<lx) lx=x1;
if(x2<lx) lx=x2;
if(y1>ry) ry=y1;
if(y2>ry) ry=y2;
if(y1<ly) ly=y1;
if(y2<ly) ly=y2;
}
else if(type=='c')
{
cin>>x1>>y1>>r;
if(x1+r>rx) rx=x1+r;
if(y1+r>ry) ry=y1+r;
if(x1-r<lx) lx=x1-r;
if(y1-r<ly) ly=y1-r;
}
else
{
cin>>x1>>y1;
if(x1>rx) rx=x1;
if(x1<lx) lx=x1;
if(y1>ry) ry=y1;
if(y1<ly) ly=y1;
}
}
cout<<lx<<" "<<ly<<" "<<rx<<" "<<ry<<"\n";
lx=1000;ly=1000;rx=0;ry=0;
}
return 0;
}
Thank You