Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<ll, llt> P;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	
	int N; cin >> N;
	vector<P> pos(N);
	rep (i, N){
		cin >> pos[i].first >> pos[i].second;
	} // end rep

	bool ok = true;
	ll par = (abs(pos[0].first) + abs(pos[0].second)) % 2LL;
	for (int i = 1; i < N; ++i){
		ll par2 = (abs(pos[i].first) + abs(pos[i].second)) % 2LL;
		if (par != par2){
			ok = false;
			break;
		} // end if
	} // end for

	if (!ok){
		cout << "-1" << endl;
	}else{
		vector<ll> d; d.clear();
		for (int i = 30; i >= 0; --i){
			d.push_back(1LL<<i);
		} // end for
		if (par % 2LL == 0LL) d.push_back(1LL);

		cout << (int)d.size() << endl;
		for (int j = 0; j < (int)d.size(); ++j){
			cout << d[j] << (j != (int)d.size() - 1 ? ' ' : '\n');
		} // end for
		rep (i, N){
			int xdir, ydir;
			ll xsum = 0LL, ysum = 0LL;
			for (int j = 0; j < (int)d.size(); ++j){
				if (xsum <= pos[i].first){
					xdir = 1, xsum += d[j];
				}else{
					xdir = -1, xsum -= d[j];
				} // end if
				if (ysum <= pos[i].second){
					ydir = 1, ysum += d[j];
				}else{
					ydir = -1, ysum -= d[j];
				} // end if

				if (xdir == 1 && ydir == 1){
					cout << "R";
				}else
				if (xdir == 1 && ydir == -1){
					cout << "U";
				}else
				if (xdir == -1 && ydir == -1){
					cout << "L";
				}else{ // if (xdir == -1 && ydir == 1)
					cout << "D";
				} // end if
			} // end for
			cout << endl;
		} // end rep
	} // end if

	return 0;
}

Compiler output:
a.cc:8:18: error: 'llt' was not declared in this scope; did you mean 'll'?
    8 | typedef pair<ll, llt> P;
      |                  ^~~
      |                  ll
a.cc:8:21: error: template argument 2 is invalid
    8 | typedef pair<ll, llt> P;
      |                     ^
a.cc: In function 'int main()':
a.cc:18:31: error: request for member 'first' in 'pos.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   18 |                 cin >> pos[i].first >> pos[i].second;
      |                               ^~~~~
a.cc:18:47: error: request for member 'second' in 'pos.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   18 |                 cin >> pos[i].first >> pos[i].second;
      |                                               ^~~~~~
a.cc:22:30: error: request for member 'first' in 'pos.std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   22 |         ll par = (abs(pos[0].first) + abs(pos[0].second)) % 2LL;
      |                              ^~~~~
a.cc:22:50: error: request for member 'second' in 'pos.std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   22 |         ll par = (abs(pos[0].first) + abs(pos[0].second)) % 2LL;
      |                                                  ^~~~~~
a.cc:24:39: error: request for member 'first' in 'pos.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   24 |                 ll par2 = (abs(pos[i].first) + abs(pos[i].second)) % 2LL;
      |                                       ^~~~~
a.cc:24:59: error: request for member 'second' in 'pos.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   24 |                 ll par2 = (abs(pos[i].first) + abs(pos[i].second)) % 2LL;
      |                                                           ^~~~~~
a.cc:48:52: error: request for member 'first' in 'pos.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   48 |                                 if (xsum <= pos[i].first){
      |                                                    ^~~~~
a.cc:53:52: error: request for member 'second' in 'pos.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   53 |                                 if (ysum <= pos[i].second){
      |                                                    ^~~~~~