Language: C++

#include "bits/stdc++.h"

using namespace std;

using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using vvvll = vector<vector<vector<ll>>>;
using vvvvll = vector<vector<vector<vector<ll>>>>;
using pl4 = pair<ll,ll>;
using str = string;
using vpl4 = vector<pair<ll,ll>>;

#define sz size()
#define be begin()
#define en end()
#define fi first
#define se second
#define pb push_back
#define mp make_pair

#define llin(x) ll (x);cin >>(x);
#define stin(x) str (x);cin >>(x);
#define vllin(x,n) vll (x)(n);FOR(i,0,n-1){cin >>(x)[i];}
#define vllin2(a,b,n) vll (a)(n);vll (b)(n);FOR(i,0,n-1){cin >>(a)[i]>>(b)[i];}
#define vllin3(a,b,c,n) vll (a)(n);vll (b)(n);vll (c)(n);FOR(i,0,n-1){cin >>(a)[i]>>(b)[i]>>(c)[i];}
#define vlling(x,n) (x).assign(n,0);FOR(i,0,n-1){cin >>(x)[i];}
#define vlling2(a,b,n) (a).assign(n,0);(b).assign(n,0);FOR(i,0,n-1){cin >>(a)[i]>>(b)[i];}
#define vlling3(a,b,c,n) (a).assign(n,0);(b).assign(n,0);(c).assign(n,0);FOR(i,0,n-1){cin >>(a)[i]>>(b)[i]>>(c)[i];}
#define vpl4in(x,n) vpl4 (x)((n),mp(0,0));FOR(i,0,n-1){cin >>x[i].fi>>x[i].se;}
#define FOR(i,a,b) for(ll i = a ; i <= b ; i++)
#define rFOR(i,b,a) for(ll i = a; i >= b ; i--)
#define SORT(x) sort(x.be, x.en)
#define rSORT(x) sort(x.rbegin(), x.rend())
#define say(x) cout<<(x);
#define sal(x) cout<<(x)<<endl;
#define says(x) cout<<(x)<<(' ');
#define sas cout<<(' ');
#define sayR(x) cout<<fixed<<setprecision(10)<<(x);
#define salR(x) cout<<fixed<<setprecision(10)<<(x)<<endl;
#define yn(a) cout <<((a)?"yes":"no")<<endl;
#define Yn(a) cout <<((a)?"Yes":"No")<<endl;
#define YN(a) cout <<((a)?"YES":"NO")<<endl;
#define Imp(a) cout <<((a)?"Possible":"Impossible")<<endl;
#define IMP(a) cout <<((a)?"POSSIBLE":"IMPOSSIBLE")<<endl;
#define pow(a,b) ll(pow(a,b))

ll MOD=1000000007;

signed main(){
        llin(n);
        vector<long double> x(n,0);
        vector<long double> y(n,0);
        vector<char> d(n);
        FOR(i,0,n-1){
                cin >>x[i]>>y[i]>>d[i];
        }
        vector<vector<long double>> xm(2,vector<long double>(2,0));
        vector<vector<long double>> ym(2,vector<long double>(2,0));
        xm[0][0]=100000000.0;
        xm[0][1]=-100000000.0; 
        xm[1][0]=100000000.0;
        xm[1][1]=-100000000.0; 
        ym[0][0]=100000000.0;
        ym[0][1]=-100000000.0; 
        ym[1][0]=100000000.0;
        ym[1][1]=-100000000.0; 
        long double xci=0;
        long double xcs=0;
        long double yci=0;
        long double ycs=0;
        FOR(i,0,n-1){
                if(d[i]=='R'){
                        xm[0][0]=min(xm[0][0],x[i]);
                        xm[0][1]=max(xm[0][1],x[i]);
                        yci=min(yci,y[i]);
                        ycs=max(ycs,y[i]);
                }else if(d[i]=='L'){
                        xm[1][0]=min(xm[1][0],x[i]);
                        xm[1][1]=max(xm[1][1],x[i]);
                        yci=min(yci,y[i]);
                        ycs=max(ycs,y[i]);
                }else if(d[i]=='U'){
                        ym[0][0]=min(ym[0][0],y[i]);
                        ym[0][1]=max(ym[0][1],y[i]);
                        xci=min(xci,x[i]);
                        xcs=max(xcs,x[i]);
                }else if(d[i]=='D'){
                        ym[1][0]=min(ym[1][0],y[i]);
                        ym[1][1]=max(ym[1][1],y[i]);
                        xci=min(xci,x[i]);
                        xcs=max(xcs,x[i]);
                }
        }
        vector<long double> p(0);
        if(xm[0][0]<xm[1][0]) p.pb(long double(xm[1][0]-xm[0][0])/2.0);
        if(xm[0][1]<xm[1][1]) p.pb(long double(xm[1][1]-xm[0][1])/2.0);
        if(ym[0][0]<ym[1][0]) p.pb(long double(ym[1][0]-ym[0][0])/2.0);
        if(ym[0][1]<ym[1][1]) p.pb(long double(ym[1][1]-ym[0][1])/2.0);
        if(xm[0][0]<xci) p.pb(long double(xci-xm[0][0]));
        if(xm[0][1]<xcs) p.pb(long double(xcs-xm[0][1]));
        if(ym[0][0]<yci) p.pb(long double(yci-ym[0][0]));
        if(ym[0][1]<ycs) p.pb(long double(ycs-ym[0][1]));
        if(xci<xm[1][0]) p.pb(long double(xm[1][0]-xci));
        if(xcs<xm[1][1]) p.pb(long double(xm[1][1]-xcs));
        if(yci<ym[1][0]) p.pb(long double(ym[1][0]-yci));
        if(ycs<ym[1][1]) p.pb(long double(ym[1][1]-ycs));
        long double xmi=0;
        long double xms=0;
        long double ymi=0;
        long double yms=0;
        long double k=-1;
        FOR(i,0,ll(p.sz)-1){
                xmi=min(xm[0][0]+p[i],min(xm[1][0]-p[i],xci));
                xms=max(xm[0][1]+p[i],max(xm[1][1]-p[i],xcs));
                ymi=min(ym[0][0]+p[i],min(ym[1][0]-p[i],yci));
                yms=max(ym[0][1]+p[i],max(ym[1][1]-p[i],ycs));
                k=(k==-1?(xms-xmi)*(yms-ymi):min((xms-xmi)*(yms-ymi),k));           
        }
        xmi=min(xm[0][0],min(xm[1][0],xci));
        xms=max(xm[0][1],max(xm[1][1],xcs));
        ymi=min(ym[0][0],min(ym[1][0],yci));
        yms=max(ym[0][1],max(ym[1][1],ycs));
        k=(k==-1?(xms-xmi)*(yms-ymi):min((xms-xmi)*(yms-ymi),k));           
                
        sal(k)
}


Compiler output:
a.cc: In function 'int main()':
a.cc:96:36: error: expected primary-expression before 'long'
   96 |         if(xm[0][0]<xm[1][0]) p.pb(long double(xm[1][0]-xm[0][0])/2.0);
      |                                    ^~~~
a.cc:97:36: error: expected primary-expression before 'long'
   97 |         if(xm[0][1]<xm[1][1]) p.pb(long double(xm[1][1]-xm[0][1])/2.0);
      |                                    ^~~~
a.cc:98:36: error: expected primary-expression before 'long'
   98 |         if(ym[0][0]<ym[1][0]) p.pb(long double(ym[1][0]-ym[0][0])/2.0);
      |                                    ^~~~
a.cc:99:36: error: expected primary-expression before 'long'
   99 |         if(ym[0][1]<ym[1][1]) p.pb(long double(ym[1][1]-ym[0][1])/2.0);
      |                                    ^~~~
a.cc:100:31: error: expected primary-expression before 'long'
  100 |         if(xm[0][0]<xci) p.pb(long double(xci-xm[0][0]));
      |                               ^~~~
a.cc:101:31: error: expected primary-expression before 'long'
  101 |         if(xm[0][1]<xcs) p.pb(long double(xcs-xm[0][1]));
      |                               ^~~~
a.cc:102:31: error: expected primary-expression before 'long'
  102 |         if(ym[0][0]<yci) p.pb(long double(yci-ym[0][0]));
      |                               ^~~~
a.cc:103:31: error: expected primary-expression before 'long'
  103 |         if(ym[0][1]<ycs) p.pb(long double(ycs-ym[0][1]));
      |                               ^~~~
a.cc:104:31: error: expected primary-expression before 'long'
  104 |         if(xci<xm[1][0]) p.pb(long double(xm[1][0]-xci));
      |                               ^~~~
a.cc:105:31: error: expected primary-expression before 'long'
  105 |         if(xcs<xm[1][1]) p.pb(long double(xm[1][1]-xcs));
      |                               ^~~~
a.cc:106:31: error: expected primary-expression before 'long'
  106 |         if(yci<ym[1][0]) p.pb(long double(ym[1][0]-yci));
      |                               ^~~~
a.cc:107:31: error: expected primary-expression before 'long'
  107 |         if(ycs<ym[1][1]) p.pb(long double(ym[1][1]-ycs));
      |                               ^~~~