Language: C++

#include <bits/stdc++.h>
#define LL __int64
using namespace std;
const int maxn = 1010;
int n;
LL x[maxn],y[maxn],u[maxn],v[maxn],bs[35];
void work(){
    cin >> n;
    for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
    LL sum = (x[0] + y[0]) % 2;
    for (int i = 0; i < n; i++) if ((x[i] + y[i]) % 2 != sum) {cout<<"-1"<<endl;return;}

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

    for (int i = 0; i < n; i++) u[i] = x[i] + y[i], v[i] = x[i] - y[i];

    for (int i = 0; i < n; i++) {
        for (int j = 30; j > -1; j--) {
            if (u[i] > 0 && v[i] > 0) {cout << 'R'; u[i] -= bs[j];  v[i] -= bs[j];}//x[i] > y[i] & x[i] > 0
            else if (u[i] > 0 && v[i] < 0) {cout << 'U'; u[i] -= bs[j];  v[i] += bs[j];}//y[i] > x[i] & y[i] > 0
            else if (u[i] < 0 && v[i] > 0) {cout << 'D'; u[i] += bs[j];  v[i] -= bs[j];}//x[i] > y[i] && y[i] < 0
            else {cout << 'L'; u[i] += bs[j];  v[i] += bs[j];}//x[i] < y[i] & x[i] < 0;
      }
      if (sum == 0) cout << 'L';
      cout << endl;
    }
}
int main(){
    bs[0] = 1;
    for (int i=1;i<32;i++) bs[i] = bs[i-1] << 1;
    work();
    return 0;
}



Compiler output:
a.cc:2:12: error: '__int64' does not name a type; did you mean '__int64_t'?
    2 | #define LL __int64
      |            ^~~~~~~
a.cc:6:1: note: in expansion of macro 'LL'
    6 | LL x[maxn],y[maxn],u[maxn],v[maxn],bs[35];
      | ^~
a.cc: In function 'void work()':
a.cc:9:40: error: 'x' was not declared in this scope
    9 |     for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
      |                                        ^
a.cc:9:48: error: 'y' was not declared in this scope
    9 |     for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
      |                                                ^
a.cc:2:12: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
    2 | #define LL __int64
      |            ^~~~~~~
a.cc:10:5: note: in expansion of macro 'LL'
   10 |     LL sum = (x[0] + y[0]) % 2;
      |     ^~
a.cc:11:38: error: 'x' was not declared in this scope
   11 |     for (int i = 0; i < n; i++) if ((x[i] + y[i]) % 2 != sum) {cout<<"-1"<<endl;return;}
      |                                      ^
a.cc:11:45: error: 'y' was not declared in this scope
   11 |     for (int i = 0; i < n; i++) if ((x[i] + y[i]) % 2 != sum) {cout<<"-1"<<endl;return;}
      |                                             ^
a.cc:11:58: error: 'sum' was not declared in this scope
   11 |     for (int i = 0; i < n; i++) if ((x[i] + y[i]) % 2 != sum) {cout<<"-1"<<endl;return;}
      |                                                          ^~~
a.cc:13:9: error: 'sum' was not declared in this scope
   13 |     if (sum == 0) {
      |         ^~~
a.cc:15:43: error: 'bs' was not declared in this scope; did you mean 'abs'?
   15 |       for (int i = 30; i > -1; i--) cout<<bs[i]<<" ";
      |                                           ^~
      |                                           abs
a.cc:17:35: error: 'x' was not declared in this scope
   17 |       for (int i = 0; i < n; i++) x[i]++;
      |                                   ^
a.cc:20:43: error: 'bs' was not declared in this scope; did you mean 'abs'?
   20 |       for (int i = 30; i > -1; i--) cout<<bs[i]<<" ";
      |                                           ^~
      |                                           abs
a.cc:24:33: error: 'u' was not declared in this scope
   24 |     for (int i = 0; i < n; i++) u[i] = x[i] + y[i], v[i] = x[i] - y[i];
      |                                 ^
a.cc:24:40: error: 'x' was not declared in this scope
   24 |     for (int i = 0; i < n; i++) u[i] = x[i] + y[i], v[i] = x[i] - y[i];
      |                                        ^
a.cc:24:47: error: 'y' was not declared in this scope
   24 |     for (int i = 0; i < n; i++) u[i] = x[i] + y[i], v[i] = x[i] - y[i];
      |                                               ^
a.cc:24:53: error: 'v' was not declared in this scope
   24 |     for (int i = 0; i < n; i++) u[i] = x[i] + y[i], v[i] = x[i] - y[i];
      |                                                     ^
a.cc:28:17: error: 'u' was not declared in this scope
   28 |             if (u[i] > 0 && v[i] > 0) {cout << 'R'; u[i] -= bs[j];  v[i] -= bs[j];}//x[i] > y[i] & x[i] > 0
      |                 ^
a.cc:28:29: error: 'v' was not declared in this scope
   28 |             if (u[i] > 0 && v[i] > 0) {cout << 'R'; u[i] -= bs[j];  v[i] -= bs[j];}//x[i] > y[i] & x[i] > 0
      |                             ^
a.cc:28:61: error: 'bs' was not declared in this scope; did you mean 'abs'?
   28 |             if (u[i] > 0 && v[i] > 0) {cout << 'R'; u[i] -= bs[j];  v[i] -= bs[j];}//x[i] > y[i] & x[i] > 0
      |                                                             ^~
      |                                                             abs
a.cc:29:66: error: 'bs' was not declared in this scope; did you mean 'abs'?
   29 |             else if (u[i] > 0 && v[i] < 0) {cout << 'U'; u[i] -= bs[j];  v[i] += bs[j];}//y[i] > x[i] & y[i] > 0
      |                                                                  ^~
      |                                                                  abs
a.cc:30:66: error: 'bs' was not declared in this scope; did you mean 'abs'?
   30 |             else if (u[i] < 0 && v[i] > 0) {cout << 'D'; u[i] += bs[j];  v[i] -= bs[j];}//x[i] > y[i] && y[i] < 0
      |                                                                  ^~
      |                                                                  abs
a.cc:31:40: error: 'bs' was not declared in this scope; did you mean 'abs'?
   31 |             else {cout << 'L'; u[i] += bs[j];  v[i] += bs[j];}//x[i] < y[i] & x[i] < 0;
      |                                        ^~
      |                                        abs
a.cc:33:11: error: 'sum' was not declared in this scope
   33 |       if (sum == 0) cout << 'L';
      |           ^~~
a.cc: In function 'int main()':
a.cc:38:5: error: 'bs' was not declared in this scope; did you mean 'abs'?
   38 |     bs[0] = 1;
      |     ^~
      |     abs