Language: C++

#include <bits/stdc++.h>
using namespace std;
#define modulo 1000000007
#define mod(mod_x) (((long long)mod_x)%modulo)
#define Inf 1000000000000000000

struct data{
	long long x,y;
	long long vx=0,vy=0;
};


int main(){
	
	int N;
	cin>>N;
	vector<data> V(N);
	
	for(int i=0;i<N;i++){
		cin>>V[i].x>>V[i].y;
		V[i].x*=2;
		V[i].y*=2;
		char c;
		cin>>c;
		switch(c){
			case 'U':{
				V[i].vy = 1;
				break;
			}
			case 'D':{
				V[i].vy = -1;
				break;
			}
			case 'R':{
				V[i].vx = 1;
				break;
			}
			case 'L':{
				V[i].vx = -1;
				break;
			}
		}
	}
	vector<long long> t(0);
	{
		vector<pair<long long,long long>> lim(3,make_pair(Inf,-Inf));
		for(int i=0;i<N;i++){
			int a = V[i].vx+1;
			lim[a].first = min(lim[a].first,V[i].x);
			lim[a].second = max(lim[a].second,V[i].x);
		}
		
		for(int i=0;i<6;i++){
			for(int j=0;j<6;j++){
				long long x1,x2;
				int a = i/2;
				int b = j/2;
				if(i%2)x1=lim[a].first;
				else x1=lim[a].second;
				if(j%2)x2=lim[b].first;
				else x2=lim[b].second;
				a--;b--;
				if(a-b==0)continue;
				long long tt = (x1-x2)/(b-a);
				if(tt>=0)t.push_back(tt);
		
			}
		}
	{
		vector<pair<long long,long long>> lim(3,make_pair(Inf,-Inf));
		for(int i=0;i<N;i++){
			int a = V[i].vy+1;
			lim[a].first = min(lim[a].first,V[i].y);
			lim[a].second = max(lim[a].second,V[i].y);
		}
		
		for(int i=0;i<6;i++){
			for(int j=0;j<6;j++){
				long long x1,x2;
				int a = i/2;
				int b = j/2;
				if(i%2)x1=lim[a].first;
				else x1=lim[a].second;
				if(j%2)x2=lim[b].first;
				else x2=lim[b].second;
				a--;b--;
				if(a-b==0)continue;
				long long tt = (x1-x2)/(b-a);
				if(tt>=0)t.push_back(tt);
		
			}
		}
	}

	
	long long mini = Inf;

	for(int i=0;i<t.size();i++){
		long long max_x = -Inf,min_x = Inf,max_y = -Inf,min_y = Inf;
		for(int j=0;j<N;j++){
			long long xx = V[j].x+V[j].vx*t[i];
			long long yy = V[j].y+V[j].vy*t[i];
			max_x = max(max_x,xx);
			min_x = min(min_x,xx);
			max_y = max(max_y,yy);
			min_y = min(min_y,yy);
		}
		
		mini = min(mini,(max_x-min_x)*(max_y-min_y));
	}
	cout<<(double)mini/4<<endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: template argument 1 is invalid
   17 |         vector<data> V(N);
      |                    ^
a.cc:17:20: error: template argument 2 is invalid
a.cc:20:23: error: invalid types 'int[int]' for array subscript
   20 |                 cin>>V[i].x>>V[i].y;
      |                       ^
a.cc:20:31: error: invalid types 'int[int]' for array subscript
   20 |                 cin>>V[i].x>>V[i].y;
      |                               ^
a.cc:21:18: error: invalid types 'int[int]' for array subscript
   21 |                 V[i].x*=2;
      |                  ^
a.cc:22:18: error: invalid types 'int[int]' for array subscript
   22 |                 V[i].y*=2;
      |                  ^
a.cc:27:34: error: invalid types 'int[int]' for array subscript
   27 |                                 V[i].vy = 1;
      |                                  ^
a.cc:31:34: error: invalid types 'int[int]' for array subscript
   31 |                                 V[i].vy = -1;
      |                                  ^
a.cc:35:34: error: invalid types 'int[int]' for array subscript
   35 |                                 V[i].vx = 1;
      |                                  ^
a.cc:39:34: error: invalid types 'int[int]' for array subscript
   39 |                                 V[i].vx = -1;
      |                                  ^
a.cc:48:34: error: invalid types 'int[int]' for array subscript
   48 |                         int a = V[i].vx+1;
      |                                  ^
a.cc:49:58: error: invalid types 'int[int]' for array subscript
   49 |                         lim[a].first = min(lim[a].first,V[i].x);
      |                                                          ^
a.cc:50:60: error: invalid types 'int[int]' for array subscript
   50 |                         lim[a].second = max(lim[a].second,V[i].x);
      |                                                            ^
a.cc:72:34: error: invalid types 'int[int]' for array subscript
   72 |                         int a = V[i].vy+1;
      |                                  ^
a.cc:73:58: error: invalid types 'int[int]' for array subscript
   73 |                         lim[a].first = min(lim[a].first,V[i].y);
      |                                                          ^
a.cc:74:60: error: invalid types 'int[int]' for array subscript
   74 |                         lim[a].second = max(lim[a].second,V[i].y);
      |                                                            ^
a.cc:101:41: error: invalid types 'int[int]' for array subscript
  101 |                         long long xx = V[j].x+V[j].vx*t[i];
      |                                         ^
a.cc:101:48: error: invalid types 'int[int]' for array subscript
  101 |                         long long xx = V[j].x+V[j].vx*t[i];
      |                                                ^
a.cc:102:41: error: invalid types 'int[int]' for array subscript
  102 |                         long long yy = V[j].y+V[j].vy*t[i];
      |                                         ^
a.cc:102:48: error: invalid types 'int[int]' for array subscript
  102 |                         long long yy = V[j].y+V[j].vy*t[i];
      |                                                ^
a.cc:114:2: error: expected '}' at end of input
  114 | }
      |  ^
a.cc:13:11: note: to match this '{'
   13 | int main(){
      |           ^