Language: C++

#include <iostream>
#include <vector>

using namespace std;

using ll_t = long long;

int const INF = ( 1 << 30 );

struct dist_func
{
    ll_t l1, r1, l2, r2, m1, m2;
    vector<ll_t> ts;

    dist_func( ll_t a, ll_t b, ll_t c, ll_t d, ll_t e, ll_t f )
        : l1( a ), r1( b ), l2( c ), r2( d ), m1( e ), m2( f )
    {
        ts.push_back( 0 );
        while ( true )
        {
            ll_t nt = find_next( ts.back() );
            if ( nt == int( 2e8 ) ) break;
            ts.push_back( nt );
        }
    }

    ll_t eval( ll_t t ) const
    {
        return max( {r1 + t, r2 - t, m2} ) - min( {l1 + t, l2 - t, m1} );
    }

    ll_t operator()( ll_t t ) const { return eval( t ); }

    ll_t find_next( ll_t t )
    {
        ll_t s = eval( t + 1 ) - eval( t );
        ll_t l = t, r = 2e8;
        while ( l < r )
        {
            ll_t m = l + ( r - l ) / 2;
            if ( eval( m + 1 ) - eval( m ) == s )
                l = m + 1;
            else
                r = m;
        }
        return l;
    }
};

int main()
{
    ll_t r1, r2, l1, l2, x1, x2, d1, d2, u1, u2, y1, y2;
    r1 = l1 = x1 = d1 = u1 = y1 = INF;
    r2 = l2 = x2 = d2 = u2 = y2 = -INF;

    int N;
    cin >> N;

    vector<ll_t> X( N ), Y( N );
    vector<char> D( N );
    for ( int i = 0; i < N; i++ ) cin >> X[i] >> Y[i] >> D[i];

    for ( int i = 0; i < N; i++ )
    {
        ll_t x = X[i];
        ll_t y = Y[i];
        char s = D[i];

        x *= 2;
        y *= 2;
        switch ( s )
        {
        case 'R':
            r1 = min( r1, x );
            r2 = max( r2, x );
            y1 = min( y1, y );
            y2 = max( y2, y );
            break;
        case 'L':
            l1 = min( l1, x );
            l2 = max( l2, x );
            y1 = min( y1, y );
            y2 = max( y2, y );
            break;
        case 'U':
            u1 = min( u1, y );
            u2 = max( u2, y );
            x1 = min( x1, x );
            x2 = max( x2, x );
            break;
        case 'D':
            d1 = min( d1, y );
            d2 = max( d2, y );
            x1 = min( x1, x );
            x2 = max( x2, x );
            break;
        default:
            throw;
        }
    }

    dist_func dx( r1, r2, l1, l2, x1, x2 );
    dist_func dy( u1, u2, d1, d2, y1, y2 );

    ll_t res = dx( 0 ) * dy( 0 );
    for ( ll_t t : dx.ts ) res = min( res, dx( t ) * dy( t ) );
    for ( ll_t t : dy.ts ) res = min( res, dx( t ) * dy( t ) );
    cout << res / 4.0 << "\n";
}


Compiler output:
a.cc: In member function 'll_t dist_func::eval(ll_t) const':
a.cc:29:19: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   29 |         return max( {r1 + t, r2 - t, m2} ) - min( {l1 + t, l2 - t, m1} );
      |                ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:29:49: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   29 |         return max( {r1 + t, r2 - t, m2} ) - min( {l1 + t, l2 - t, m1} );
      |                                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided