Language: C++

#include<bits/stdc++.h>
using namespace std;
inline int read () {
	int num = 0;
	char c = ' ';
	bool flag = true;
	for (;c > '9' || c < '0';c = getchar())
		if (c == '-')
			flag = false;
	for (;c >= '0' && c <= '9';num = (num << 1) + (num << 3) + c - 48, c = getchar());
	return flag ? num : -num;
}
namespace INIT {
	const int maxn = 1020;
	struct ques {
		long long x, y;
	} q[maxn];
	int n;
	void init () {
		n = read ();
		for (int i = 1;i <= n;i ++)
			q[i].x = read(), q[i].y = read ();
	}
} using namespace INIT;

namespace CHECK {
	bool odd = 0;
	void check () {
		for (int i = 1;i < n;i ++)
			if (((q[i].x + q[i].y) & 1) != ((q[i + 1].x + q[i + 1].y) & 1)) {
				printf ("%d\n", -1);
				exit (0);
			}
		odd = (q[1].x + q[1].y) & 1;
	}
} using namespace CHECK;

namespace get_Di {
	long long d[50]; int m = 0;
	void work1 () {
		d[++ m] = 1;
		while (d[m] <= 5)
			d[++ m] = 1ll * d[m - 1] << 1;
		if (!odd) d[++ m] = 1;
		printf ("%d\n", m);
		for (int i = 1;i <= m;i ++)
			printf ("%lld ",d[i]);
		printf ("\n");
	}
} using namespace get_Di;

namespace get_direct {
	inline double dis (long long x, long long y) {
		return sqrt ((double)x * x + (double)y * y);
	}
	vector <char> ans;
	void work2 () {
		for (int i = 1;i <= n; i ++) {
			ans.clear ();
			long long x = q[i].x;
			long long y = q[i].y;
			for (int j = m;j >= 1;j --)
				if (abs (x) > abs (y)) {
					if (x < 0) {
						ans.push_back ('L');
						x += d[j];
					}
					else {
						ans.push_back ('R');
						x -= d[j];
					}
				}
				else {
					if (y < 0) {
						ans.push_back ('D');
						y += d[j];
					}
					else {
						ans.push_back ('U');
						y -= d[j];
					}
				}
			for (int i = ans.size () - 1;i >= 0;i --)
				printf ("%c",ans[i]);
			printf ("\n");
		}
	}
} using namespace get_direct;
int main () {
	init ();
	check ();
	work1 ();
	work2 ();
	return 0;
}#include<bits/stdc++.h>
using namespace std;
inline int read () {
	int num = 0;
	char c = ' ';
	bool flag = true;
	for (;c > '9' || c < '0';c = getchar())
		if (c == '-')
			flag = false;
	for (;c >= '0' && c <= '9';num = (num << 1) + (num << 3) + c - 48, c = getchar());
	return flag ? num : -num;
}
namespace INIT {
	const int maxn = 1020;
	struct ques {
		long long x, y;
	} q[maxn];
	int n;
	void init () {
		n = read ();
		for (int i = 1;i <= n;i ++)
			q[i].x = read(), q[i].y = read ();
	}
} using namespace INIT;

namespace CHECK {
	bool odd = 0;
	void check () {
		for (int i = 1;i < n;i ++)
			if (((q[i].x + q[i].y) & 1) != ((q[i + 1].x + q[i + 1].y) & 1)) {
				printf ("%d\n", -1);
				exit (0);
			}
		odd = (q[1].x + q[1].y) & 1;
	}
} using namespace CHECK;

namespace get_Di {
	long long d[50]; int m = 0;
	void work1 () {
		d[++ m] = 1;
		while (d[m] <= 5)
			d[++ m] = 1ll * d[m - 1] << 1;
		if (!odd) d[++ m] = 1;
		printf ("%d\n", m);
		for (int i = 1;i <= m;i ++)
			printf ("%lld ",d[i]);
		printf ("\n");
	}
} using namespace get_Di;

namespace get_direct {
	inline double dis (long long x, long long y) {
		return sqrt ((double)x * x + (double)y * y);
	}
	vector <char> ans;
	void work2 () {
		for (int i = 1;i <= n; i ++) {
			ans.clear ();
			long long x = q[i].x;
			long long y = q[i].y;
			for (int j = m;j >= 1;j --)
				if (abs (x) > abs (y)) {
					if (x < 0) {
						ans.push_back ('L');
						x += d[j];
					}
					else {
						ans.push_back ('R');
						x -= d[j];
					}
				}
				else {
					if (y < 0) {
						ans.push_back ('D');
						y += d[j];
					}
					else {
						ans.push_back ('U');
						y -= d[j];
					}
				}
			for (int i = ans.size () - 1;i >= 0;i --)
				printf ("%c",ans[i]);
			printf ("\n");
		}
	}
} using namespace get_direct;
int main () {
	init ();
	check ();
	work1 ();
	work2 ();
	return 0;
}

Compiler output:
a.cc:95:2: error: stray '#' in program
   95 | }#include<bits/stdc++.h>
      |  ^
a.cc:95:3: error: 'include' does not name a type
   95 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:97:12: error: redefinition of 'int read()'
   97 | inline int read () {
      |            ^~~~
a.cc:3:12: note: 'int read()' previously defined here
    3 | inline int read () {
      |            ^~~~
a.cc:108:19: error: redefinition of 'const int INIT::maxn'
  108 |         const int maxn = 1020;
      |                   ^~~~
a.cc:14:19: note: 'const int INIT::maxn' previously defined here
   14 |         const int maxn = 1020;
      |                   ^~~~
a.cc:109:16: error: redefinition of 'struct INIT::ques'
  109 |         struct ques {
      |                ^~~~
a.cc:15:16: note: previous definition of 'struct INIT::ques'
   15 |         struct ques {
      |                ^~~~
a.cc:111:11: error: conflicting declaration 'int INIT::q [1020]'
  111 |         } q[maxn];
      |           ^
a.cc:17:11: note: previous declaration as 'INIT::ques INIT::q [1020]'
   17 |         } q[maxn];
      |           ^
a.cc:112:13: error: redefinition of 'int INIT::n'
  112 |         int n;
      |             ^
a.cc:18:13: note: 'int INIT::n' previously declared here
   18 |         int n;
      |             ^
a.cc:113:14: error: redefinition of 'void INIT::init()'
  113 |         void init () {
      |              ^~~~
a.cc:19:14: note: 'void INIT::init()' previously defined here
   19 |         void init () {
      |              ^~~~
a.cc:121:14: error: redefinition of 'bool CHECK::odd'
  121 |         bool odd = 0;
      |              ^~~
a.cc:27:14: note: 'bool CHECK::odd' previously defined here
   27 |         bool odd = 0;
      |              ^~~
a.cc:122:14: error: redefinition of 'void CHECK::check()'
  122 |         void check () {
      |              ^~~~~
a.cc:28:14: note: 'void CHECK::check()' previously defined here
   28 |         void check () {
      |              ^~~~~
a.cc:133:19: error: redefinition of 'long long int get_Di::d [50]'
  133 |         long long d[50]; int m = 0;
      |                   ^
a.cc:39:19: note: 'long long int get_Di::d [50]' previously declared here
   39 |         long long d[50]; int m = 0;
      |                   ^
a.cc:133:30: error: redefinition of 'int get_Di::m'
  133 |         long long d[50]; int m = 0;
      |                              ^
a.cc:39:30: note: 'int get_Di::m' previously defined here
   39 |         long long d[50]; int m = 0;
      |                              ^
a.cc:134:14: error: redefinition of 'void get_Di::work1()'
  134 |         void work1 () {
      |              ^~~~~
a.cc:40:14: note: 'void get_Di::work1()' previously defined here
   40 |         void work1 () {
      |              ^~~~~
a.cc:147:23: error: redefinition of 'double get_direct::dis(long long int, long long int)'
  147 |         inline double dis (long long x, long long y) {
      |                       ^~~
a.cc:53:23: note: 'double get_direct::dis(long long int, long long int)' previously defined here
   53 |         inline double dis (long long x, long long y) {
      |                       ^~~
a.cc:150:23: error: redefinition of 'std::vector<char> get_direct::ans'
  150 |         vector <char> ans;
      |                       ^~~
a.cc:56:23: note: 'std::vector<char> get_direct::ans' previously declared here
   56 |         vector <char> ans;
      |                       ^~~
a.cc:151:14: error: redefinition of 'void get_direct::work2()'
  151 |         void work2 () {
      |              ^~~~~
a.cc:57:14: note: 'void get_direct::work2()' previously defined here
   57 |         void work2 () {
      |              ^~~~~
a.cc:183:5: error: redefinition of 'int main()'
  183 | int main () {
      |     ^~~~
a.cc:89:5: note: 'int main()' previously defined here
   89 | int main () {
      |     ^~~~