Language: C++

<D-a>#include <bits/stdc++.h>

typedef long long ll;
using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n; cin >> n;
	ll x[1005],y[1005];

	int mod = -1;

	for (int i = 0;i < n;i++){
		cin >> x[i] >> y[i];
		if(i == 0) mod = abs(x[i]+y[i])%2;
		else if(mod != abs(x[i]+y[i])%2){
			cout << -1 << endl;
			return 0;
		}
	}

	vector<string> w(n,""),p(n,"");

	if(mod == 0){
		cout << 32 << endl << 1 << " ";
		for (int i = 0;i <= 30;i++){
			cout << (1<<i) << " ";
		}
		cout << endl;
		for (int i = 0;i < n;i++){
			p[i] += "R";
			x[i] -= 1;
		}
	}else{
		cout << 31 << endl;
		for (int i = 0;i <= 30;i++){
			cout << (1<<i) << " ";
		}
		cout << endl;
	}

	for (int i = 0;i < n;i++){
		for (int j = 30;j >= 0;j--){
			ll d  = 1 << j;
			ll nx = d-1;
			//cout << nx << endl;
			if(abs(x[i]-d)+abs(y[i]) <= nx){
				w[i] = "R" + w[i];
				x[i] -= d;
			}else if(abs(x[i]+d)+abs(y[i]) <= nx){
				w[i] = "L" + w[i];
				x[i] += d;
			}else if(abs(x[i])+abs(y[i]+d) <= nx){
				w[i] = "D" + w[i];
				y[i] += d;
			}else if(abs(x[i])+abs(y[i]-d) <= nx){
				w[i] = "U" + w[i];
				y[i] -= d;
			}
		}
		//reverse(w[i].begin(),w[i].end());
		cout << p[i] + w[i] << endl;
	}
	
	return 0;

}


Compiler output:
a.cc:1:6: error: stray '#' in program
    1 | <D-a>#include <bits/stdc++.h>
      |      ^
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <D-a>#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin.tie(0);
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | <D-a>#include <bits/stdc++.h>
a.cc:8:9: error: 'ios' has not been declared
    8 |         ios::sync_with_stdio(false);
      |         ^~~
a.cc:11:9: error: 'll' was not declared in this scope
   11 |         ll x[1005],y[1005];
      |         ^~
a.cc:16:24: error: 'x' was not declared in this scope
   16 |                 cin >> x[i] >> y[i];
      |                        ^
a.cc:16:32: error: 'y' was not declared in this scope
   16 |                 cin >> x[i] >> y[i];
      |                                ^
a.cc:17:34: error: 'abs' was not declared in this scope
   17 |                 if(i == 0) mod = abs(x[i]+y[i])%2;
      |                                  ^~~
a.cc:18:32: error: 'abs' was not declared in this scope
   18 |                 else if(mod != abs(x[i]+y[i])%2){
      |                                ^~~
a.cc:19:25: error: 'cout' was not declared in this scope
   19 |                         cout << -1 << endl;
      |                         ^~~~
a.cc:19:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:39: error: 'endl' was not declared in this scope
   19 |                         cout << -1 << endl;
      |                                       ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | <D-a>#include <bits/stdc++.h>
a.cc:24:9: error: 'vector' was not declared in this scope
   24 |         vector<string> w(n,""),p(n,"");
      |         ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | <D-a>#include <bits/stdc++.h>
a.cc:24:16: error: 'string' was not declared in this scope
   24 |         vector<string> w(n,""),p(n,"");
      |                ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | <D-a>#include <bits/stdc++.h>
a.cc:24:24: error: 'w' was not declared in this scope
   24 |         vector<string> w(n,""),p(n,"");
      |                        ^
a.cc:24:32: error: 'p' was not declared in this scope
   24 |         vector<string> w(n,""),p(n,"");
      |                                ^
a.cc:27:17: error: 'cout' was not declared in this scope
   27 |                 cout << 32 << endl << 1 << " ";
      |                 ^~~~
a.cc:27:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:31: error: 'endl' was not declared in this scope
   27 |                 cout << 32 << endl << 1 << " ";
      |                               ^~~~
a.cc:27:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:34:25: error: 'x' was not declared in this scope
   34 |                         x[i] -= 1;
      |                         ^
a.cc:37:17: error: 'cout' was not declared in this scope
   37 |                 cout << 31 << endl;
      |                 ^~~~
a.cc:37:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:37:31: error: 'endl' was not declared in this scope
   37 |                 cout << 31 << endl;
      |                               ^~~~
a.cc:37:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:46:27: error: expected ';' before 'd'
   46 |                         ll d  = 1 << j;
      |                           ^~
      |                           ;
a.cc:47:27: error: expected ';' before 'nx'
   47 |                         ll nx = d-1;
      |                           ^~~
      |                           ;
a.cc:49:32: error: 'x' was not declared in this scope
   49 |                         if(abs(x[i]-d)+abs(y[i]) <= nx){
      |                                ^
a.cc:49:37: error: 'd' was not declared in this scope
   49 |                         if(abs(x[i]-d)+abs(y[i]) <= nx){
      |                                     ^
a.cc:49:28: error: 'abs' was not declared in this scope
   49 |                         if(abs(x[i]-d)+abs(y[i]) <= nx){
      |                            ^~~
a.cc:49:44: error: 'y' was not declared in this scope
   49 |                         if(abs(x[i]-d)+abs(y[i]) <= nx){
      |                                            ^
a.cc:49:53: error: 'nx' was not declared in this scope; did you mean 'n'?
   49 |                         if(abs(x[i]-d)+abs(y[i]) <= nx){
      |                                                     ^~
      |                                                     n
a.cc:64:17: error: 'cout' was not declared in this scope
   64 |                 cout << p[i] + w[i] << endl;
      |                 ^~~~
a.cc:64:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:64:40: error: 'endl' was not declared in this scope
   64 |                 cout << p[i] + w[i] << endl;
      |                                        ^~~~
a.cc:64:40: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'