Language: C++

#include<iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <cstring>
#include <string>
typedef long long ll;
using namespace std;
int n,x[100005],y[100005],d[100005];
char ch[]="RLUD";
int dx[]={1,-1,0,0},dy[]={0,0,1,-1};
const unsigned int mo=1e9+7;
double ans;
bool tra(long double t){
	long double max=x[0]+t*dx[d[0]],mix=max,may=y[0]+t*dy[d[0]],miy=may;
	ll nmax=0,nmix=0,nmay=0,nmiy=0;
	for(int i=1;i<n;++i){
		long double X=x[i]+t*dx[d[i]],Y=y[i]+t*dy[d[i]];
		if(X>max)nmax=i,max=X;
		if(X<mix)nmix=i,mix=X;
		if(Y>may)nmay=i,may=Y;
		if(Y<miy)nmiy=i,miy=Y;
	}
	//cout<<max<<may<<mix<<miy<<endl;
	ans=min(ans,(max-mix)*(may-miy));
	int px=dx[d[nmax]]-dx[d[nmix]],py=dy[d[nmay]]-dy[d[nmiy]];
	if(px*(may-miy)+py*(max-mix)>=0)return 0;
	return 1;
}
int main(){
	scanf("%d",&n);
	for(int i=0;i<n;++i){
		char tp;
		scanf("%d%d %c",x+i,y+i,&tp);
		for(int j=0;j<4;++j){
			if(ch[j]==tp){
				//cout<<j<<endl;
				d[i]=j;break;
			}
		}
	}
	long double l=0,r=2e8;
	for(int i=0;i<200;++i){
		double mid=(l+r)/2;
		//printf("%.39lf\n",mid);
		if(tra(mid))l=mid;
		else r=mid;
		//printf("%.39lf\n",(double)ans);
	}
	printf("%.17lf\n",ans);
	return 0;
} 
/*
3
-1000 0 U
1000 0 L
-1900 0 R
*/

Compiler output:
a.cc: In function 'bool tra(long double)':
a.cc:26:16: error: no matching function for call to 'min(double&, long double)'
   26 |         ans=min(ans,(max-mix)*(may-miy));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
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: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:   template argument deduction/substitution failed:
a.cc:26:16: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'long double')
   26 |         ans=min(ans,(max-mix)*(may-miy));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/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, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:26:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'double'
   26 |         ans=min(ans,(max-mix)*(may-miy));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~