criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
#define int long long
#define debug(...) fprintf(stderr, __VA_ARGS__)

using namespace std;
typedef long long ll;
const int N = 1005;

inline int input() {
	int x; char ch; while (!isdigit(ch = getchar()));
	for (x = ch ^ 48; isdigit(ch = getchar()); x = x * 10 + (ch ^ 48));
	return x;
}

inline int Power(int x, int y) {
	int res = 1;
	while (y) {
		if (y & 1) res = (ll) res * x % mod;
		x = (ll) x * x % mod, y >>= 1;
	} return res;
}

inline void chkmin(int &x, int y) { x = x < y ? x : y; }
template <class T> T sqr(T x) { return x * x; }

int n;
int x[N], y[N];
int d[100];
bool flag;

int dis(int xa, int ya, int xb, int yb) {
	return abs(xa - xb) + abs(ya - yb);
}

signed main() {
#ifdef local
	freopen("in", "r", stdin);
	freopen("out", "w", stdout);
//	freopen("log", "w", stderr);
#endif
	ios::sync_with_stdio(false);

	cin >> n; 
	for (int i = 1; i <= n; ++i)
		cin >> x[i] >> y[i];
	flag = abs(x[1] + y[1]) & 1;

	for (int i = 1; i <= n; ++i)
		if ((abs(x[i] + y[i]) & 1) != flag)
			return puts("-1"), 0;

	if (!flag) for (int i = 1; i <= n; ++i) --x[i];

	puts(flag ? "30" : "31");
	for (int i = 1; i <= 30; ++i)
		printf("%d ", d[i] = 1 << (30 - i));
	if (!flag) printf("%d\n", d[31] = 1);
	else putchar('\n');

	for (int i = 1; i <= n; ++i) {
		int xd = 0, yd = 0;
		for (int i = 1; i <= 30; ++i) {
			if (dis(xd + d[i], yd, x[i], y[i]) <= d[i] - 1) xd += d[i], putchar('R');
			if (dis(xd - d[i], yd, x[i], y[i]) <= d[i] - 1) xd -= d[i], putchar('L');
			if (dis(xd, yd + d[i], x[i], y[i]) <= d[i] - 1) yd += d[i], putchar('U');
			if (dis(xd, yd - d[i], x[i], y[i]) <= d[i] - 1) yd -= d[i], putchar('D');
		}
		if (!flag) putchar('R');
		putchar('\n');
	}

	return 0;
}

Compiler output:
a.cc: In function 'long long int Power(long long int, long long int)':
a.cc:18:49: error: 'mod' was not declared in this scope; did you mean 'modf'?
   18 |                 if (y & 1) res = (ll) res * x % mod;
      |                                                 ^~~
      |                                                 modf
a.cc:19:34: error: 'mod' was not declared in this scope; did you mean 'modf'?
   19 |                 x = (ll) x * x % mod, y >>= 1;
      |                                  ^~~
      |                                  modf
Language: C++

#include <bits/stdc++.h>

using namespace std;

long long dx[] = {-1, 1, 0, 0};
long long dy[] = {0, 0, -1, 1};
char dir[] = {'L', 'R', 'D', 'U'};

int get(int x, int y) {
    return (((x + y) % 2) + 2) % 2;
}

void solve() {
    int n;
    cin >> n;
    vector<long long> x(n), y(n);
    for (int i = 0; i < n; i++) {
        cin >> x[i] >> y[i];
        if (i > 0 && get(x[i - 1], y[i - 1]) != get(x[i], y[i])) {
            cout << -1; return;
        }
    }
    int parity = get(x[0], y[0]);
    cout << 30 + (parity == 0) << "\n";
    if (!parity) cout << 1 << ' ';
    for (int i = 29; i >= 0; i--) {
        cout << (1 << i) << ' ';
    }
    cout << "\n";
    for (int i = 0; i < n; i++) {
        string s;
        if (!parity) s.push_back('U'), y[i]++;
        for (int j = 29; j >= 0; j--) {
            for (int k = 0; k < 4; k++) {
                long long nx = x[i] + 1LL * dx[k] * (1LL << j), ny = y[i] + 1LL * dy[k] * (1LL << j);
                if (abs(nx) + abs(ny) <= (1LL << j) - 1) {
                    x[i] = nx, y[i] = ny;
                    s.push_back(dir[k])
                    break;
                }
            }
        }
        reverse(s.begin(), s.end());
        cout << s << "\n";
    }
}

int main() {
    ios::sync_with_stdio(NULL), cin.tie(0), cout.tie(0);
    cout.setf(ios::fixed), cout.precision(20);
    solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:38:40: error: expected ';' before 'break'
   38 |                     s.push_back(dir[k])
      |                                        ^
      |                                        ;
   39 |                     break;
      |                     ~~~~~
Language: C++

#include <bits/stdc++.h>
#include <cstdio>
#include <vector>
#include <iostream>
#include <utility>

#define fir first
#define sec second
#define get(n) scanf("%d",&n);
#define gets(s) string s;cin >> (s);
#define All(s) (c).begin(), (c).end()
#define chmin(x, y) x = min(x, y);
#define chmax(x, y) x = max(x, y);
#define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
#define repk(i, j, k) for(int (i)=(j);(i)<(k);(i)++)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
using namespace std;
typedef long long int ll;
const ll INF = 10241024;

int N;
vector<pair<int, int> > cor;

void input() {
    cin >> N;
    rep(i, N){
        int a,b;cin >> a >> b;
        cor[i].fir = a;
        cor[i].sec = b;
    }
}

void solve() {
    vector<pair<int, string> ans(N);
    bool ok = true;
    int j = 0;

    for (int i=1;i<=N;i++){
        int a,b;
        a = cor[i].fir - cor[i-1].fir;
        b = cor[i].sec - cor[i-1].sec;
        if(a != 0 && b != 00){
            cout << -1 << endl;
            ok = false;
            break;
        }
        if(b == 0){
            ans[j].fir = a;
            if(a>0){
                ans[j].sec = "R";
            }else {
                ans[j].sec = "L"; 
            }
        }else {
            ans[j].fir = b;
            if(b > 0){
                ans[j].sec = "U";
            }else {
                ans[j].sec = "D";
            }
        }
    }

    if(!ok) {
        for (int i=0;i<=j;i++){
            cout << ans[i].fir << " " ;
        }
        for(int i=0;i<=j;i++){
            cout << ans[i].sec << endl;
        }
    }
}

int main () {
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:35:35: error: template argument 1 is invalid
   35 |     vector<pair<int, string> ans(N);
      |                                   ^
a.cc:35:35: error: template argument 2 is invalid
a.cc:49:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   49 |             ans[j].fir = a;
      |             ^~~
      |             abs
a.cc:56:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   56 |             ans[j].fir = b;
      |             ^~~
      |             abs
a.cc:67:21: error: 'ans' was not declared in this scope; did you mean 'abs'?
   67 |             cout << ans[i].fir << " " ;
      |                     ^~~
      |                     abs
a.cc:70:21: error: 'ans' was not declared in this scope; did you mean 'abs'?
   70 |             cout << ans[i].sec << endl;
      |                     ^~~
      |                     abs
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;
	
	vector<int> X(n), Y(n), sum(n);
	for (int i = 0; i < n; ++i) {
		cin >> X[i] >> Y[i];
		sum[i] = X[i] + Y[i];
	}
	
	for (int i = 1; i < n; ++i) {
		if (abs((X[i] + Y[i]) % 2) != abs((X[0] + Y[0]) % 2)) {
			cout << -1 << "\n";
			return 0;
		}
	}
	
	set<int> stX(X.begin(), X.end());
	vector<int> vX(st.begin(), st.end());
	
	cout << 1 / 0 << "\n";
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: 'st' was not declared in this scope; did you mean 'stX'?
   22 |         vector<int> vX(st.begin(), st.end());
      |                        ^~
      |                        stX
a.cc:24:19: warning: division by zero [-Wdiv-by-zero]
   24 |         cout << 1 / 0 << "\n";
      |                 ~~^~~
Language: C++

#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <map>
#include <unordered_map>

using namespace std;

#define rep(i, n) for(int i = 0; i < n; ++i)
#define all(s) s.begin(), s.end()

int main() {
  int n;
  cin >> n;

  bool odd = false, even = false;
  vector< pair<int64_t, int64_t> > a(n);
  rep(i, n) {
    int64_t x, y;
    cin >> x >> y;

    // For Debug
    // cout << "x: " << x << ", y: " << y << endl;
    if ((x+y) & 1) {
      odd = true;
      // cout << "odd" << endl;
    } else {
      even = true;
      // cout << "even" << endl;
    }
    a[i].first = x;
    a[i].second = y;
  }
  if (odd && even) {
    cout << -1 << endl;
    return 0;
  }

  int m = 31;
  // int m = 3;
  cout << (even ? m+1 : m) << endl;

  vector<int64_t> d(m);
  rep(i, m) {
    d[i] = 1ll << i;
  }
  reverse(all(d));
  for (auto& x : d) {
    cout << x << ' ';
  }
  if (even) {
    cout << 1 << endl;
  } else {
    cout << endl;
  }

  for (auto& p : a) {
    int64_t x, y;
    tie(x, y) = p;
    if (even) { --x; }
    string res;
    rep(i, m) {
      bool u = x+y>0, v = x-y>0;
      if (u  && v)  { res += "R", x -= d[i]; continue; }
      if (!u && v)  { res += "D", y += d[i]; continue; }
      if (u  && !v) { res += "U", y -= d[i]; continue; }
      if (!u && !v) { res += "L", x += d[i]; continue; }
    }
    assert(x == 0 && y == 0);
    if (even) { res += "R"; };
    cout << res << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:70:5: error: 'assert' was not declared in this scope
   70 |     assert(x == 0 && y == 0);
      |     ^~~~~~
a.cc:7:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
    6 | #include <unordered_map>
  +++ |+#include <cassert>
    7 |
Language: C++

#include <bits/stdc++.h>

#define long long long

using namespace std;

const int N = 1e3+5;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
const char dir[4] = {'L', 'D', 'R', 'U'};

int n, X[N], Y[N];

int main() {
    scanf("%d", &n);
    for(int i = 1; i <= n; i++) scanf("%d %d", X + i, Y + i);
    
    bool chk = (X[1] + Y[1]) & 1;
    for(int i = 2; i <= n; i++) if(((X[i] + Y[i]) & 1) != now) {
        printf("-1\n");
        return 0;
    }
    if(!chk) {
        printf("32\n");
        printf("1 ");
        for(int i = 1; i <= n; i++) --X[i];
    } else printf("31\n");
    for(int i = 0; i <= 30; i++) printf("%d ", 1 << i);
    printf("\n"); 

    for(int i = 1; i <= n; i++) {
        long x = X[i], y = Y[i];
        vector<char> ans;
        for(int j = 30; ~j; j--) {
            long now = 1ll << j;
            for(int k = 0; k < 4; k++) if(abs(x + now * dx[k]) + abs(y + now * dy[k]) <= now - 1) {
                x += now * dx[k], y += now * dy[k];
                ans.emplace_back(dir[k]);
                break;
            }
        }
        if(!chk) ans.emplace_back('R');
        reverse(ans.begin(), ans.end());
        for(char c : ans) printf("%c", c);
        printf("\n");
    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:59: error: 'now' was not declared in this scope; did you mean 'pow'?
   18 |     for(int i = 2; i <= n; i++) if(((X[i] + Y[i]) & 1) != now) {
      |                                                           ^~~
      |                                                           pow
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;
using ll = long long;

int main() {
  int n;
  cin >> n;
  vector<ll> X(n), Y(n);
  int st = 0;
  for (int i = 0; i < n; i++) {
    ll x, y;
    cin >> x >> y;
    X[i] = x - y;
    Y[i] = x + y;
    st |= 1 << (abs(x + y) % 2);
  }
  if (st == 3) {
    cout << "-1\n";
    return 0;
  }
  vector<ll> d;
  for (int i = 0; i < 38; i++) {
    d.push_back(1LL << 38 - i);
  }
  if (*st.begin() == 1) {
    d.push_back(1);
    d.push_back(1);
  }
  cout << d.size() << '\n';
  for (ll x : d) cout << x << ' ';
  cout << '\n';
  for (int i = 0; i < n; i++) {
    ll xx = 0;
    ll yy = 0;
    cout << X[i] << ' ' << Y[i] << endl;
    for (int j = 0; j < d.size(); j++) {
      int dx = 0;
      int dy = 0;
      if (X[i] > 0) {
        dx = 1;
        X[i] -= d[j];
        xx += d[j];
      } else {
        dx = -1;
        X[i] += d[j];
        xx -= d[j];
      }
      if (Y[i] > 0) {
        dy = 1;
        Y[i] -= d[j];
        yy += d[j];
      } else {
        dy = -1;
        Y[i] += d[j];
        yy -= d[j];
      }
      // +,+ R
      // -,+ U
      // -,- L
      // +,- D
      if (dx > 0 && dy > 0) cout << 'R';
      if (dx < 0 && dy > 0) cout << 'U';
      if (dx < 0 && dy < 0) cout << 'L';
      if (dx > 0 && dy < 0) cout << 'D';
    }
    cout << '\n';
    cout << xx << ' ' << yy << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:11: error: request for member 'begin' in 'st', which is of non-class type 'int'
   29 |   if (*st.begin() == 1) {
      |           ^~~~~
Language: C++

#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <chrono>
#include <vector>

using namespace std;

int main () {
    int N;
    cin >> N;
    vector<long long int> x(N), y(N);
    for (int i=0; i<N; i++) {
        cin >> x[i] >> y[i];
    }
    vector<string> s(N, "");
    vector<long long int> d;

    if ( ((x[0] + y[0]) & 1) != 1 ) {
        d.push_back(1);
        for (int i=0; i<N; i++) {
            y[i]--;
            s[i].push_back('U');
        }
    }

    long long int step = 1;
    while( step < (1LL << 33) ) {
        d.push_back(step);
        for(int i=0; i<N; i++) {
            if ( ((x[i] + y[i]) & 1) != 1 ) {
                cout << -1 << endl;
                return 0;
            }
            if ( x[i] & 1 ) {
                if (((x[i] - 1) & 2 ) == (y[i] & 2)) {
                    x[i]++;
                    s[i].push_back('L');
                } else {
                    x[i]--;
                    s[i].push_back('R');
                }
            } else {
                if (((y[i] - 1) & 2 ) == (x[i] & 2)) {
                    y[i]++;
                    s[i].push_back('D');
                } else {
                    y[i]--;
                    s[i].push_back('U');
                }
            }
            x[i] /= 2;
            y[i] /= 2;
        }
        step <<= 1;
    }
    d.push_back(step);
    for (int i=0; i<N; i++) {
        assert(x[i] * x[i] + y[i] * y[i] == 1);
        if (x[i] == 1) {
            s[i].push_back('R');
        } else if (x[i] == -1) {
            s[i].push_back('L');
        } else if (y[i] == 1) {
            s[i].push_back('U');
        } else {
            s[i].push_back('D');
        }
    }
    int m = (int) d.size();
    cout << m << endl;
    for (int i; i<m; i++) {
        if (i>0) {
            cout << " ";
        }
        cout << d[i];
    }
    cout << endl;
    for (int i; i< N; i++) {
        cout << s[i] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:9: error: 'assert' was not declared in this scope
   63 |         assert(x[i] * x[i] + y[i] * y[i] == 1);
      |         ^~~~~~
a.cc:10:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
    9 | #include <vector>
  +++ |+#include <cassert>
   10 |
Language: C++

#include <stdio.h>
#include <vector>
using namespace std;

int N; long long X[1010],Y[1010]; int P[1010];
char A[1010][44];

int main()
{
	scanf ("%d",&N);
	for (int i=0;i<N;i++){
		scanf ("%lld %lld",&X[i],&Y[i]);
		P[i] = (X[i] % 2 + Y[i] % 2 + 2) % 2;
	}

	for (int i=0;i<N;i++) if (P[i] != P[0]){
		puts("-1");
		return 0;
	}

	vector<long long> mv;
	for (int i=0;i<6+P[0];i++) mv.push_back(1);
	for (int i=1;i<32;i++) mv.push_back(1ll << i);

	long long sum = 0;
	for (int j=0;j<mv.size();j++) sum += mv[j];
	for (int j=mv.size()-1;j>=0;j--){
		auto l = mv[j];
		sum -= l;

		int dx[4] = {0,1,0,-1};
		int dy[4] = {1,0,-1,0};
		char ch[6] = "URDL";
		for (int i=0;i<N;i++) for (int k=0;k<4;k++){
			long long px = X[i] - dx[k] * l;
			long long py = Y[i] - dy[k] * l;
			if (abs(px) + abs(py) <= sum){
				X[i] = px;
				Y[i] = py;
				A[i][j] = ch[k];
				break;
			}
		}
	}

	printf ("%d\n",mv.size());
	for (int j=0;j<mv.size();j++) printf ("%lld%c",mv[j],j+1<mv.size()?' ':'\n');
	for (int i=0;i<N;i++) puts(A[i]);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:29: error: 'abs' was not declared in this scope
   37 |                         if (abs(px) + abs(py) <= sum){
      |                             ^~~
Language: C++

#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>

using namespace std;

using ii = pair<int,int>;
using ll = long long;

const int N = 200005;
const int mod = 924844033;

int main() {
#ifdef ONLINE_JUDGE
	ios_base::sync_with_stdio(0);
	cin.tie(0);
#endif

	int n;
	cin >> n;
	vector<pair<ll,ll>> vp(n);
	int mask = 0;
	for (auto & x : vp) {
		cin >> x.first >> x.second;
		mask |= (1 << ((abs(x.first) + abs(x.second)) & 1));
	}

	if (mask == 3) {
		cout << "-1\n";
		return 0;
	}

	vector<ll> v;

	for (int i = 31; i >= 0; i--
		v.push_back(1ll << i);

	if ((abs(vp[0].first) + abs(vp[0].second)) & 1 ^ 1) {
		v.push_back(1);
	}
	cout << v.size() << '\n';
	for (auto x : v)
		cout << x << ' ';
	cout << '\n';

	for (auto & x : vp) {
		for (auto val : v) {
			if (abs(x.first) >= abs(x.second)) {
				if (x.first >= 0) {
					cout << 'R';
					x.first -= val;
				} else {
					cout << 'L';
					x.first += val;
				}
			} else {
				if (x.second >= 0) {
					cout << 'U';
					x.second -= val;
				} else {
					cout << 'D';
					x.second += val;
				}
			}
		}
		assert(max(abs(x.first),abs(x.second)) == 0);
		cout << '\n';
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:37: error: expected ')' before 'v'
   36 |         for (int i = 31; i >= 0; i--
      |             ~                       ^
      |                                     )
   37 |                 v.push_back(1ll << i);
      |                 ~
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl
#define svec(v) cout<<#v<<":";rep(pachico,v.size())cout<<" "<<v[pachico];cout<<endl
#define svecp(v) cout<<#v<<":";each(pachico,v)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define sset(s) cout<<#s<<":";each(pachico,s)cout<<" "<<pachico;cout<<endl
#define smap(m) cout<<#m<<":";each(pachico,m)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl

using namespace std;

typedef pair<int,int> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<P> vp;
typedef vector<string> vs;

const int MAX_N = 100005;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    vl x(n), y(n);
    int flag = -1;
    bool dame = false;
    rep(i,n){
        cin >> x[i] >> y[i];
        if(flag < 0){
            flag = (x[i]+y[i])%2;
        }else if((x[i]+y[i])%2 != flag){
            dame = true;
        }
    }
    if(dame){
        cout << "-1\n":
        return 0;
    }
    ll nw = 1;
    if(flag){
        cout << "40\n";
        rep(i,40){
            cout << nw << " ";
            nw *= 2;
        }
        cout << "\n";
    }else{
        cout << "40\n";
        cout << nw << " ";
        rep(i,39){
            cout << nw << " ";
            nw *= 2;
        }
        cout << "\n";
    }
    rep(i,n){
        if(!flag) cout << 'R', x[i]--;
        string s;
        ll val = nw / 2;
        while(val){
            if(y[i] > x[i]){
                if(y[i] > -x[i]){
                    s.pb('U');
                    y[i] -= val;
                }else{
                    s.pb('L');
                    x[i] += val;
                }
            }else{
                if(y[i] > -x[i]){
                    s.pb('R');
                    x[i] -= val;
                }else{
                    s.pb('D');
                    y[i] += val;
                }
            }
            val /= 2;
        }
        reverse(all(s));
        cout << s << "\n";
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:23: error: expected ';' before ':' token
   58 |         cout << "-1\n":
      |                       ^
      |                       ;
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;

int n;
long long x[1010],y[1010];
long long p[40];
int fx[4]={-1,1,0,0};
int fy[4]={0,0,1,-1};

int main(){
	scanf("%d",&n);
	scanf("%lld %lld",&x[1],&y[1]);
	int flag=(x[1]+y[1]+(long long)1e9)%2;
	for(int i=2;i<=n;i++){
		scanf("%lld %lld",&x[i],&y[i]);
		if(flag!=(x[i]+y[i]+(long long)2e9)%2){
			printf("-1\n");
			return 0;
		}
	}
	for(int i=30;i>=0;i--) p[30-i+1]=(1ll<<i);
	int m=31;
	if(flag==0) p[++m]=1;
	printf("%d\n",m);
	for(int i=1;i<=m;i++) printf("%lld ",p[i]);
	printf("\n");
	long long tempx,tempy;
	long long mmin;
	int w;
	for(int i=1;i<=n;i++){
		long long xx=x[i],yy=y[i];
		for(int j=1;j<=m;j++){
			mmin=5e9ll,w=0;
			for(int q=0;q<4;q++){
				tempx=xx+fx[q]*p[j];
				tempy=yy+fy[q]*p[j];
				if(abs(tempx)+abs(tempy)<mmin){
					mmin=abs(tempx)+abs(tempy);
					w=q;
				}
			}
			if(w==0) printf("R");
			else if(w==1) printf("L");
			else if(w==2) printf("D");
			else if(w==3) printf("U");
			xx+=fx[w]*p[j];
			yy+=fy[w]*p[j];
		}
		printf("\n");
	}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:30: error: unable to find numeric literal operator 'operator""ll'
   37 |                         mmin=5e9ll,w=0;
      |                              ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n; cin >> n;
  vector<int> x(n),y(n);
  for(int i=0;i<n;i++) cin >> x[i] >> y[i];
  for(int i=0;i<n;i++) if((x[0] + y[0]) % 2 != (x[i] + y[i]) % 2){cout << -1 << endl; return 0;}
  int par = (x[0] + y[0]) % 2;
  cout << 31 + par << endl;
  int p = 1;
  if(par) cout << 1 << endl;
  for(int i=0;i<31;i++){
  	cout << p << endl;
    p = 2 * p;
  }
  p /= 2;
  for(int i=0;i<n;i++){
    if(par) cout << "D";
    int xx = x[i] + par, yy = y[i] ++ par;
    for(int j=0;j<31;j++){
      int u = xx + yy, v = xx - yy;
      if(u >=0 && v >= 0){cout << "L"; xx -= p;}
      else if(u >=0 && v <= 0){cout << "D"; yy -= p;}
      else if(u <=0 && v <= 0){cout << "R"; xx += p;}
      else if(u <=0 && v >= 0){cout << "U"; yy += p;}
      p /= 2;
    }
    cout << endl;
  }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:39: error: expected ',' or ';' before 'par'
   20 |     int xx = x[i] + par, yy = y[i] ++ par;
      |                                       ^~~
Language: C++

#include <cstdio>
long long arr[45], x[1005], y[1005];
int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%lld%lld", x + i, y + i);
		if ((x[i] + y[i] & 1) ^ (x[0] + y[0] & 1)) {
			puts("-1");
			return 0;
		}
	}
	int m = 40;
	arr[m - 1] = arr[m - 2] = arr[m - 3] = arr[m - 4] = 1;
	for (int i = m - 5; i >= 0; i--)
		arr[i] = arr[i + 1] << 1;
	if (x[0] + y[0] & 1)
		m--;
	printf("%d\n", m);
	for (int i = 0; i < m; i++)
		printf("%lld%c", arr[i], " \n"[i + 1 == m]);
	auto abs = [&] (ll x) { return x < 0 ? -x : x; };
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < m; j++) {
			if (abs(x[i]) <= abs(y[i])) {
				putchar(y[i] <= 0 ? 'D' : 'U');
				y[i] += arr[j] * (y[i] <= 0 ? 1 : -1);
			} else {
				putchar(x[i] <= 0 ? 'L' : 'R');
				x[i] += arr[j] * (x[i] <= 0 ? 1 : -1);
			}
		}
		puts("");
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: 'll' has not been declared
   23 |         auto abs = [&] (ll x) { return x < 0 ? -x : x; };
      |                         ^~
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  inr N, X[1000], Y[1000], S[1000];
  cin >> N;
  FOR(i,0,N) {
    cin >> X[i] >> Y[i];
    S[i] = X[i] + Y[i];
    if((S[i] - S[0]) % 2 != 0) {
      cout << -1 << endl;
      return 0;
    }
  }

  vector<int> values;
  for(int i=30;i>=0;i--) values.push_back(1<<i);
  if(S[0] % 2 == 0) values.push_back(1);
  int M = values.size();
  cout << M << endl;
  FOR(i,0,M) cout << values[i] << " \n"[i==M-1];
  FOR(i,0,N) {
    int xpy = X[i] + Y[i], xmy = X[i] - Y[i];
    for(auto& v : values) {
      if(xpy >= 0) {
        if(xmy >= 0) {
          cout << "R";
          xpy -= v;
          xmy -= v;
        } else {
          cout << "U";
          xpy -= v;
          xmy += v;
        }
      } else {
        if(xmy >= 0){
          cout << "D";
          xpy += v;
          xmy -= v;
        }else{
          cout << "L";
          xpy += v;
          xmy += v;
        }
      }
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:3: error: 'inr' was not declared in this scope; did you mean 'int'?
   29 |   inr N, X[1000], Y[1000], S[1000];
      |   ^~~
      |   int
a.cc:30:10: error: 'N' was not declared in this scope
   30 |   cin >> N;
      |          ^
a.cc:32:12: error: 'X' was not declared in this scope
   32 |     cin >> X[i] >> Y[i];
      |            ^
a.cc:32:20: error: 'Y' was not declared in this scope
   32 |     cin >> X[i] >> Y[i];
      |                    ^
a.cc:33:5: error: 'S' was not declared in this scope
   33 |     S[i] = X[i] + Y[i];
      |     ^
a.cc:42:6: error: 'S' was not declared in this scope
   42 |   if(S[0] % 2 == 0) values.push_back(1);
      |      ^
a.cc:47:15: error: 'X' was not declared in this scope
   47 |     int xpy = X[i] + Y[i], xmy = X[i] - Y[i];
      |               ^
a.cc:47:22: error: 'Y' was not declared in this scope
   47 |     int xpy = X[i] + Y[i], xmy = X[i] - Y[i];
      |                      ^
a.cc:50:12: error: 'xmy' was not declared in this scope; did you mean 'xpy'?
   50 |         if(xmy >= 0) {
      |            ^~~
      |            xpy
a.cc:60:12: error: 'xmy' was not declared in this scope; did you mean 'xpy'?
   60 |         if(xmy >= 0){
      |            ^~~
      |            xpy
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N, X[1000], Y[1000], S[1000];
  cin >> N;
  FOR(i,0,N) {
    cin >> X[i] >> Y[i];
    S[i] = X[i] + Y[i];
    if((S[i] - S[0]) % 2 != 0) {
      cout << -1 << endl;
      return 0;
    }
  }

  vector<int> values;
  for(i=30;i>=0;i--) values.push_bach(1<<i);
  if(S[0] % 2 == 0) values.push_back(1);
  int M = values.size();
  cout << M << endl;
  FOR(i,0,M) {
    int xpy = X[i] + Y[i], xmy = X[i] - Y[i];
    for(auto&& v : values) {
      if(xpy >= 0) {
        if(xmy >= 0) {
          cout << "R";
          xpy -= v;
          xmy -= v;
        } else {
          cout << "U";
          xpy -= v;
          xmy += v;
        }
      } else {
        if(xmy >= 0){
          cout << "D";
          xpy += v;
          xmy -= v;
        }else{
          cout << "L";
          xpy += v;
          xmy += v;
        }
      }
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:7: error: 'i' was not declared in this scope
   41 |   for(i=30;i>=0;i--) values.push_bach(1<<i);
      |       ^
a.cc:41:29: error: 'class std::vector<int>' has no member named 'push_bach'; did you mean 'push_back'?
   41 |   for(i=30;i>=0;i--) values.push_bach(1<<i);
      |                             ^~~~~~~~~
      |                             push_back
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i,n,m) for(int i=(n);i<(m);i++)
#define REP(i,n) FOR(i,0,n)
#define REPR(i,n) for(int i=(n);i>=0;i--)
#define all(vec) vec.begin(),vec.end()
using vi=vector<int>;
#define fi first
#define se second
#define pb push_back
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}


int main(){
    int n;
    cin>>n;
    vi a(n),b(n);
    int m=0;
    REP(i,n){
        cin>>a[i]>>b[i];
        assert(abs(a[i])<=10&&abs(b[i])<=10);
        chmax(m,abs(a[i])+abs(b[i]));
    }
    REP(i,n){
        if((abs(a[i])+abs(b[i]))%2!=m%2){
            //原点からの距離の偶奇が異なる->不可能
            cout<<-1<<endl;
            return 0;
        }
    }
    if(!m){
        //(0,0)にしか行かない場合がコーナー
        cout<<"2"<<endl;
        cout<<"1 1"<<endl;
        REP(i,n){
            cout<<"LR"<<endl;
        }
        return 0;
    }
    //mを1番遠い点に合わせる
    cout<<m<<endl;
    int m=40-(p+q)%2
    REP(i,p+q){
        if(i)cout<<" ";cout<<1;
    }cout<<endl;
    REP(i,n){
        //必要回数動いてからあとは反復横跳び
        cout<<string(abs(a[i]),a[i]>=0?'R':'L')<<string(abs(b[i]),b[i]>=0?'U':'D');
        REP(j,(m-abs(a[i])-abs(b[i]))/2){
            cout<<"LR";
        }
        cout<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:9: error: redeclaration of 'int m'
   44 |     int m=40-(p+q)%2
      |         ^
a.cc:20:9: note: 'int m' previously declared here
   20 |     int m=0;
      |         ^
a.cc:44:15: error: 'p' was not declared in this scope
   44 |     int m=40-(p+q)%2
      |               ^
a.cc:44:17: error: 'q' was not declared in this scope
   44 |     int m=40-(p+q)%2
      |                 ^
a.cc:45:9: error: 'i' was not declared in this scope
   45 |     REP(i,p+q){
      |         ^
a.cc:4:34: note: in definition of macro 'FOR'
    4 | #define FOR(i,n,m) for(int i=(n);i<(m);i++)
      |                                  ^
a.cc:45:5: note: in expansion of macro 'REP'
   45 |     REP(i,p+q){
      |     ^~~
Language: C++

どうせ、
2^(m-1) - 1, 1, 2, 4, 8, …
として、立っているビットの数で場合分けでしょ？
もう分かったから、負の数と次元を増やすのは勘弁して。

Compiler output:
a.cc:1:1: error: extended character 、 is not valid in an identifier
    1 | どうせ、
      | ^
a.cc:2:26: error: extended character … is not valid in an identifier
    2 | 2^(m-1) - 1, 1, 2, 4, 8, …
      |                          ^
a.cc:3:1: error: extended character 、 is not valid in an identifier
    3 | として、立っているビットの数で場合分けでしょ？
      | ^
a.cc:4:1: error: extended character 、 is not valid in an identifier
    4 | もう分かったから、負の数と次元を増やすのは勘弁して。
      | ^
a.cc:4:1: error: extended character 。 is not valid in an identifier
a.cc:1:1: error: '\U00003069\U00003046\U0000305b\U00003001' does not name a type
    1 | どうせ、
      | ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

#define int long long
const double PI = 3.14159265358979323846;
typedef vector<int> vint;
typedef pair<int, int> pint;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

// 最小公倍数
int gcd(int a, int b) {
    if (b == 0) return a;
    return gcd(b, a % b);
}

int N;
int X[1100], Y[1100];
signed main() {
    cin >> N;
    for (int i = 0; i < N; i++) {
        cin >> X[i] >> Y[i];
    }
    int g=X[i];
    for(int i=0;i<N;i++){
        g=gcd(g,X[i]);
        g=gcd(g,Y[i]);
    }
    for(int i=0;i<N;i++){
        X[i]/=g;
        Y[i]/=g;
        if(abs(X[i])>20||abs(Y[i]>20)){
            cout<<-1<<endl;
            return 0;
        }
    }

    int odd = abs(X[0] + Y[0]) % 2;
    for (int i = 1; i < N; i++) {
        if (abs(X[i] + Y[i]) % 2 != odd) {
            cout << -1 << endl;
            return 0;
        }
    }
    int m = 40 - odd;
    cout << m << endl;
    for (int i = 0; i < m; i++)cout << "1 ";
    cout << endl;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < abs(X[i]); j++) {
            if (X[i] < 0) {
                cout << 'L';
            } else {
                cout << 'R';
            }
        }
        for (int j = 0; j < abs(Y[i]); j++) {
            if (Y[i] < 0) {
                cout << 'D';
            } else {
                cout << 'U';
            }
        }
        for (int j = 0; j < (m - abs(X[i]) - abs(Y[i])) / 2; j++) {
            cout << "UD";
        }
        cout << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 'i' was not declared in this scope
   24 |     int g=X[i];
      |             ^
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
ll n,i,x[1010],y[1010],oi,ma,j;
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin>>n;
    for(i=1;i<=n;i++)
    {
        cin>>x[i]>>y[i];
        oi+=(x[i]+y[i]+100000)%2;
        ma=max(ma,abs(x[i])+abs(y[i]));
    }
    if(ma==0)ma=2;
    for(i=1;i<=n;i++)
        if(ma%2!=(x[i]+y[i]+100000)%2)
    {
        cout<<"-1\n";
        return 0;
    }
    //if(oi==0||oi==n)
    {

        //if(ma>40)return 0;
       // cout<<ma<<"\n";
        for(i=1;i<ma;i++)
            cout<<1<<" ";
        cout<<1<<"\n";
        for(i=1;i<=n;i++)
        {
            for(j=1;j<=ma;j++)
            {
                if(0<x[i])
                {
                    cout<<"R";
                    x[i]--;
                }
                else
                if(0<y[i])
                {
                    cout<<"U";
                    y[i]--;
                }
                else
                if(0>x[i])
                {
                    cout<<"L";
                    x[i]++;
                }
                else
                {
                    cout<<"D";
                    y[i]++;
                }
            }
            cout<<"\n";
        }
    }
    else
        cout<<"-1\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:64:5: error: 'else' without a previous 'if'
   64 |     else
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <map>
#include <functional>
#include <math.h>
using namespace std;

#define ll long long
//#define int long long
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;

#define dump(x)  cerr << #x << " = " << (x) << endl; 
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl; 


typedef pair<int, int> P;
struct Point{
	int x, y;
};
int dx[4] = { 0, 1, 0, -1 };
int dy[4] = {1,0,-1,0};



int N;
int X[1001], Y[1001];
ll sum[1001], parity[1001];


int main(){

	cin >> N;
	for (int i = 0; i < N; i++){
		cin >> X[i] >> Y[i];
		sum[i] = X[i] + Y[i];
		parity[i] = abs(sum[i]) % 2;
	}

	int s = 0;
	for (int i = 0; i < N; i++){
		s += parity[i];
	}
	// 全部奇数or全部偶数
	if (s == 0){
		cout << 40 << endl;
		for (int i = 0; i < 40;i++) cout << 1 << " ";
		cout << endl;
		for (int i = 0; i < N; i++){
			for (int j = 0; j < abs(X[i]); j++) cout << (X[i] >= 0 ? 'R' : 'L');
			for (int j = 0; j < abs(Y[i]); j++) cout << (Y[i] >= 0 ? 'U' : 'D');
			if (abs(X[i]) + abs(Y[i]) > 40) return;
			for (int j = 0; j < 40 - abs(X[i]) - abs(Y[i]); j += 2)
				cout << "UD";
			cout << endl;
		}
	}
	else if (s == N){
		cout << 39 << endl;
		for (int i = 0; i < 39; i++) cout << 1 << " ";
		cout << endl;
		for (int i = 0; i < N; i++){
			for (int j = 0; j < abs(X[i]); j++) cout << (X[i] >= 0 ? 'R' : 'L');
			for (int j = 0; j < abs(Y[i]); j++) cout << (Y[i] >= 0 ? 'U' : 'D');
			if (abs(X[i]) + abs(Y[i]) > 40) return;
			for (int j = 0; j < 39 - abs(X[i]) - abs(Y[i]); j += 2)
				cout << "UD";
			cout << endl;
		}

	}
	else
		cout << -1 << endl;


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:57: error: return-statement with no value, in function returning 'int' [-fpermissive]
   58 |                         if (abs(X[i]) + abs(Y[i]) > 40) return;
      |                                                         ^~~~~~
a.cc:71:57: error: return-statement with no value, in function returning 'int' [-fpermissive]
   71 |                         if (abs(X[i]) + abs(Y[i]) > 40) return;
      |                                                         ^~~~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
string s;
int a[100005];
int main(){
	cin>>s;
	for(int i=1;i<=n;i++){
		a[i]=s[i-1];
	}
	for(int i=0;i<=n;i++){
		if(a[i]!=a[abs((double)(n-i))]){
			cout<<-1;
			return 0l
		}
	}
	int now=1;
	for(int i=1;i<=n;i++){
		cout<<now<<" "<<i<<endl;
		if(s[i-1]=='1') now=i;
	}
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'n' was not declared in this scope
    8 |         for(int i=1;i<=n;i++){
      |                        ^
a.cc:11:24: error: 'n' was not declared in this scope
   11 |         for(int i=0;i<=n;i++){
      |                        ^
a.cc:14:34: error: expected ';' before '}' token
   14 |                         return 0l
      |                                  ^
      |                                  ;
   15 |                 }
      |                 ~                 
a.cc:18:24: error: 'n' was not declared in this scope
   18 |         for(int i=1;i<=n;i++){
      |                        ^
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
string s;
int a[100005];
int main(){
	cin>>s;
	for(int i=1;i<=n;i++){
		a[i]=s[i-1];
	}
	for(int i=0;i<=n;i++){
		if(a[i]!=a[abs(n-i)]){
			cout<<-1;
			return 0l
		}
	}
	int now=1;
	for(int i=1;i<=n;i++){
		cout<<now<<" "<<i<<endl;
		if(s[i-1]=='1') now=i;
	}
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'n' was not declared in this scope
    8 |         for(int i=1;i<=n;i++){
      |                        ^
a.cc:11:24: error: 'n' was not declared in this scope
   11 |         for(int i=0;i<=n;i++){
      |                        ^
a.cc:14:34: error: expected ';' before '}' token
   14 |                         return 0l
      |                                  ^
      |                                  ;
   15 |                 }
      |                 ~                 
a.cc:18:24: error: 'n' was not declared in this scope
   18 |         for(int i=1;i<=n;i++){
      |                        ^
Language: C++

#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define endl "\n"
#define sz(x) ((ll)(x).size())
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define prt(x) cout << (x)
#define prtl(x) cout << (x) << endl
#define rep(i,a,b) for(ll i=a; i<b; i++)
#define rrep(i,a,b) for(ll i=a; i>b; i--)
#define mp(a, b) make_pair(a, b)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
using namespace std;
using vi = vector<int>;
using vll = vector<long long int>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vc = vector<char>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<long long int>>;
using vvc = vector<vector<char>>;
using ll = long long int;
using P = pair<long long int, long long int>;
using Map = map<long long int, long long int>;
ll INF = 1LL<<60;
ll M = 1000000007;

int main(){
    string s; cin >> s;
    ll n = sz(s);
    if(s[0]=='0'||s[n-1]=='1'){
        prt(-1);
    }else{
        bool t = true;
        if(N%2==0){
            rep(i, 0, n/2){
                if(s[i] != s[n-1-i]){
                    t = false;
                }
            }
        }else{
            rep(i, 0, n/2){
                if(s[i] != s[n-2-i]){
                    t = false;
                }
            }
        }
        if(!t){prt(-1);}
        else{

        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:12: error: 'N' was not declared in this scope
   36 |         if(N%2==0){
      |            ^
Language: C++

#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define endl "\n"
#define sz(x) ((ll)(x).size())
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define prt(x) cout << (x)
#define prtl(x) cout << (x) << endl
#define rep(i,a,b) for(ll i=a; i<b; i++)
#define rrep(i,a,b) for(ll i=a; i>b; i--)
#define mp(a, b) make_pair(a, b)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
using namespace std;
using vi = vector<int>;
using vll = vector<long long int>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vc = vector<char>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<long long int>>;
using vvc = vector<vector<char>>;
using ll = long long int;
using P = pair<long long int, long long int>;
using Map = map<long long int, long long int>;
ll INF = 1LL<<60;
ll M = 1000000007;

int main(){
    string s; cin >> s;
    ll n = sz(s);
    if(s[0]=='0'||s[n-1]=='1'){
        prt(-1);
    }else{
        bool t = true;
        rep(i, 0, N/2){
            if(s[i] != s[N-1-i]){
                t = false;
            }
        }
        if(!t){prt(-1);}
        else{
            
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:19: error: 'N' was not declared in this scope
   36 |         rep(i, 0, N/2){
      |                   ^
a.cc:9:34: note: in definition of macro 'rep'
    9 | #define rep(i,a,b) for(ll i=a; i<b; i++)
      |                                  ^
Language: C++

/*
　　　∫ ∫ ∫
　　　ノヽ
　　（＿　 ）
　（＿　　　 ）
（＿＿＿＿＿＿ ）
　ヽ(´･ω･)ﾉ　
　　 |　 /
　　 UU
*/
#pragma region macro
#include <bits/stdc++.h>
typedef long long int64;
using namespace std;
typedef vector<int> vi;
const int MOD = (int)1e9 + 7;
const int64 INF = 1LL << 62;
const int inf = 1<<30;
const char bn = '\n';
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i,s,n) for (int i = s; i < (n); i++)
#define ALL(obj) (obj).begin(), (obj).end() //コンテナじゃないと使えない!!
#define debug(x) cerr << #x << ": " << x << "\n";
#define mp make_pair
template <typename T>
ostream& operator<<(ostream& os, const vector<T> &V){
    int N = V.size();
    REP(i,N){
        os << V[i];
        if (i!=N-1) os << " ";
    }
    os << "\n";
    return os;
}
template <typename T,typename S>
ostream& operator<<(ostream& os, pair<T,S> const&P){
    os << "(";
    os << P.first;
    os << " , ";
    os << P.second;
    os << ")";
    return os;
}
template <typename T>
ostream& operator<<(ostream& os, set<T> &S){
    auto it=S.begin();
    while(it!=S.end()){
        os << *it;
        os << " ";
        it++;
    }
    os << "\n";
    return os;
}
template <typename T>
ostream& operator<<(ostream& os, deque<T> &q){
    for(auto it=q.begin();it<q.end();it++){
        os<<*it;
        os<<" ";
    }
    os<<endl;
    return os;
}
template <typename T,typename S>
ostream& operator<<(ostream& os, map<T,S> const&M){
    for(auto e:M){
        os<<e;
    }
    os<<endl;
    return os;
}
vector<pair<int,int>> dxdy = {mp(0,1),mp(1,0),mp(-1,0),mp(0,-1)};
#pragma endregion
//fixed<<setprecision(10)<<ans<<endl;

void solve(int l,int r,vector<pair<int,int>>& ans,int& now){
    if(r==1) return;
    ans.emplace_back(++now,0);
    int len = r-l+1;
    if(now + len-1 + l-1 > N) {now = inf; return;}
    REP(i,len-1){
        ans.emplace_back(now, now+1);
        now++;   
    }
    // debug(len)
    // debug(now)
    int center = now;
    REP(i,l-1) ans.emplace_back(++now,center);

}

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    string S;
    cin >> S;
    int N = S.size();
    S = '0'+move(S);
    REP(i,N){
        if(S[i]!=S[N-i]){
            cout << -1 << bn;
            return 0;
        }
    }

    int l = -1;
    int now = 0;
    vector<pair<int,int>> ans;
    REP(i,N/2+1){
        if(S[i] == '1'){
            if(l<0) l = i;
        }else if(l>0){
            solve(l,i-1,ans,now);
            l = -1;
        }
        if(i==N/2 and l>0 and S[i]=='1') solve(l,i,ans,now);
    }       
    if(now > N){
        cout << -1 << bn;
        return 0;
    }
    while(++now < N){
        ans.emplace_back(now,0);
    }
    
    // cout << ans << endl;
    for(auto a:ans) cout << a.first+1 << " " << a.second+1 << bn;
}

Compiler output:
a.cc: In function 'void solve(int, int, std::vector<std::pair<int, int> >&, int&)':
a.cc:82:28: error: 'N' was not declared in this scope
   82 |     if(now + len-1 + l-1 > N) {now = inf; return;}
      |                            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<int,int> pi;
#define f first
#define s second
#define FAST ios_base::sync_with_stdio(0); cin.tie(0);

string S;
int n;

void fail() {
	cout << -1;
	exit(0);
}

int main() {
	cin >> S;
	n = S.length();
	S = 'A' + S;
	
	if (S[n] == '1' or S[1] == '0') fail();
	for (int i =2;i <= n/2;i++) {
		//cout << i << "\n";
		if (S[i] != S[n-i]) fail();
	}

	int co = 3;
	int curn = 2;
	cout << 1 << " " << curn << "\n";
	for (int i = 2;i < n; i++) {
		if (S[i] == '1') {
			cout << curn << " " << co++ << "\n"\;
			curn = co-1;
		} else cout <<	curn << " " << co++ << "\n";
	}
}


Compiler output:
a.cc:33:60: error: stray '\' in program
   33 |                         cout << curn << " " << co++ << "\n"\;
      |                                                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
string s;
int cnt=1,root,lst;
int main(){
    cin>>s;
    int n=s.legnth();
    if (s[0]=='0'||s[n]=='1'){
        puts("-1");
        return 0;
    }
    for (int i=0; i<(n>>1); i++)
        if(s[i]!=s[n-i-2]){
            puts("-1");
            return 0;
        }
    for (int i=0; i<n; i++){
        if(s[i]=='1'){
            root=cnt;
            printf("%d %d\n",root,++cnt);
            if(lst)
                for(int j=1;j<i+1-lst;j++)
                    printf("%d %d\n",root,++cnt);
            lst=i+1;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'legnth'; did you mean 'length'?
    7 |     int n=s.legnth();
      |             ^~~~~~
      |             length
Language: C++

#include<bits/stdc++.h>
using namespace std;
main () {
    string s; cin >> s;
    if (s[0] == '0' || s.back() == '1') {
        cout << -1 << endl;
        return;
    }
    s = s.substr(0, s.size() - 1);
    int tmp = 1, nxt = 2;
    for (auto&& chr : s) {
        if (chr == '1') {
            cout << tmp << " " << nxt << endl;
            tmp = nxt;
        } else {
            cout << tmp << " " << nxt << endl;
        }
        ++nxt;
    }
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main () {
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
    7 |         return;
      |         ^~~~~~