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

#include<bits/stdc++.h>
using namespace std;
const long M=1000000007
//#define M 1000000007
long pow(long x,long p){
  if(p==0)return 1;
  if(p%2)return x*pow(x,p-1)%M;
  else {long a=pow(x,p/2);return a*2%M;}
}
int main(){
  long N;cin>>N;
  vector<long>C(N);for(int i=0;i<N;i++)cin>>C[i];
  sort(C.begin(),C.end(),greater<long>());
  long ans=0;
  for(int k=0;k<N;k++){
    ans=(ans+C[k]*((N==1?0:pow(2,2*N-2)*k)+pow(2,2*N-1)))%M;
  }
  cout<<ans%M;
  assert(ans<0);
}



Compiler output:
a.cc:5:1: error: expected ',' or ';' before 'long'
    5 | long pow(long x,long p){
      | ^~~~
a.cc: In function 'int main()':
a.cc:16:58: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'const long int' to binary 'operator%'
   16 |     ans=(ans+C[k]*((N==1?0:pow(2,2*N-2)*k)+pow(2,2*N-1)))%M;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      |             |                                             |
      |             |                                             const long int
      |             __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
long long inf=(long long)1E17;
#define i_7 (long long)(1E9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}

//typedef long long ll;
long long po(long a, long b){
    if(b==0){
        return 1;
    }
    
    long long z = po(a,b/2);
    z = mod(z*z);
    if(b%2!=0){
        z = mod(a*z);
    }
    return z;
}

//配列のSIZEは問題ごとに定義する必要がある。
const int SIZE=200'010;
long long inv[SIZE+1];//各iの逆元を格納する配列。
long long kai[SIZE+1];//i!のmodを格納する配列。
long long invkai[SIZE+1];//各i!の逆元を格納する配列。
const int MOD=i_7;
void invinit(){//上の配列を初期化する関数。
    inv[1]=1;
    for(int i=2;i<=SIZE;i++){
        inv[i] = MOD - ((MOD/i)*inv[MOD%i])%MOD;
    }
    
    kai[0]=invkai[0]=1;
    for(int i=1;i<=SIZE;i++){
        kai[i]=(kai[i-1]*i)%MOD;
        invkai[i]=(invkai[i-1]*inv[i])%MOD;
    }
}

long long comb(long long a, long long b){
    if(b<0 || a<b){
        return 0;
    }
    return mod(kai[a]*mod(invkai[b]*invkai[a-b]));
}

int main(){
  invinit();
  using namespace std;
  long long n;
  cin>>n;
  long long c[n];
  REP(i,n){
    cin>>c[i];
  }
  sort(c, c+n);
  long long ans = 0;
  long long nowp;
  for(long long k = 0; k<n; k++){
    temp = po(2, 2*n-2);
    temp *= n-k-1;
    temp = mod(temp);
    temp *= c[k];
    temp = mod(temp);
    ans += temp;
    ans = mod(temp);
  }
  cout<<ans<<endl;  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:5: error: 'temp' was not declared in this scope; did you mean 'tm'?
   67 |     temp = po(2, 2*n-2);
      |     ^~~~
      |     tm
Language: C++

#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;

const ll MOD = 1000000007;

ll modpow(ll x, ll n){
    ll res = 1;
    ll mul = x;
    while(n){
        if(n % 2) res = res * mul % MOD;
        mul = mul * mul % MOD;
        n /= 2;
    }
    return res;
}

struct Combination
{
    int maxn;
    vector<ll> fmemo;
    vector<ll> imemo;
    vector<ll> ifmemo;
    
    Combination(int maxn) : maxn(maxn){
        fmemo.resize(maxn + 1);
        imemo.resize(maxn + 1);
        ifmemo.resize(maxn + 1);
        for(ll i = 1; i <= maxn; i++){
            imemo[i] = modpow(i, MOD - 2);
        }
    }

    ll fact(ll n){
        if(n == 0) return 1;
        if(fmemo[n]) return fmemo[n];
        return fmemo[n] = n * fact(n - 1) % MOD;
    }

    ll ifact(ll n){
        if(n == 0) return 1;
        if(ifmemo[n]) return ifmemo[n];
        return ifmemo[n] = imemo[n] * ifact(n - 1) % MOD;
    }

    ll com(ll n, ll k){
        if(k > n) return 0;
        if(k == n || k == 0) return 1;
        return (fact(n) * ifact(k) % MOD) * ifact(n - k) % MOD;
    }
};

int main()
{
    ll n;
    cin >> n;
    ll c[100002];
    for(int i = 0; i < n; i++) cin >> c[i];
    sort(c, c + n);
    ll ans = 0;
    ll r = modpow(2, MOD - 2);
    for(int i = 0; i < n; i++) ans = (ans + c[i] * n % MOD * r % MOD) % MOD;
    for(int i = 0; i < n; i++){
        ans = (ans + MOD * 2 - c[i] * (n - 1) % MOD * r % MOD * r % MOD - c[i] * i % MOD * r % MOD * r % MOD) % MOD;
    }
    ans = ans * modpow(2, n * 2) % MOD;
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   60 |     sort(c, c + n);
      |     ^~~~
      |     short
Language: C++

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

using namespace std;

#define rep(i, n) for(int (i) = 0; (i) < (n); (i)++)
#define repn(i, n) for(int (i) = 1; (i) <= (n); (i)++)
#define repr(i, n) for(int (i) = (n-1); (i) >= 0; (i)--)
#define all(x) (x).begin(), (x).end()
#define lint long long

const lint MOD = 1e9 + 7;
const int MAX = 200005;

long long modpow(long long a, long long n) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

int main(){
    facinit();
    lint n; cin >> n;
    vector<lint> c;
    rep(i, n){
        lint x; cin >> x; c.push_back(x);
    }
    sort(all(c));

    if(n==1){
        cout << (c[0] * 2) % MOD << endl; return 0;
    }

    lint c_max = (n+1) * modpow(2, n-2);
    lint d = modpow(2, n-2);

    lint res = 0;
    rep(i, n){
        res += ((c_max % MOD) * c[i]) % MOD;
        c_max -= d;
    }
    res = (res * modpow(2, n)) % MOD; 
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'facinit' was not declared in this scope
   30 |     facinit();
      |     ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
long long inf=(long long)1E17;
#define i_7 (long long)(1E9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}

//typedef long long ll;
long long po(long a, long b){
    if(b==0){
        return 1;
    }
    
    long long z = po(a,b/2);
    z = mod(z*z);
    if(b%2!=0){
        z = mod(a*z);
    }
    return z;
}

//配列のSIZEは問題ごとに定義する必要がある。
const int SIZE=200'010;
long long inv[SIZE+1];//各iの逆元を格納する配列。
long long kai[SIZE+1];//i!のmodを格納する配列。
long long invkai[SIZE+1];//各i!の逆元を格納する配列。
const int MOD=i_7;
void invinit(){//上の配列を初期化する関数。
    inv[1]=1;
    for(int i=2;i<=SIZE;i++){
        inv[i] = MOD - ((MOD/i)*inv[MOD%i])%MOD;
    }
    
    kai[0]=invkai[0]=1;
    for(int i=1;i<=SIZE;i++){
        kai[i]=(kai[i-1]*i)%MOD;
        invkai[i]=(invkai[i-1]*inv[i])%MOD;
    }
}

long long comb(long long a, long long b){
    if(b<0 || a<b){
        return 0;
    }
    return mod(kai[a]*mod(invkai[b]*invkai[a-b]));
}

int main(){
  invinit();
  using namespace std;
  long long n;
  cin>>n;
  vector<long long> c(n);
  REP(i,n){
    cin>>c[i];
  }
  sort(ALL(c));
  long long ans = 0;
  for(long long k = 0; k<n; k++){
    for(long long d = 1; d<=(n-k-1); d++){
      long long temp = mod(d);
      temp *= c[k];
      temp = mod(temp);
      temp *= comb(n-k-1, d);
      temp = mod(temp);
      temp *= po(2, n+k+1);
      temp = mod(temp);
      ans += temp;
      ans = mod(ans);
    }
  }
  cout<<ans<<endl;  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:62:8: error: 'ALL' was not declared in this scope
   62 |   sort(ALL(c));
      |        ^~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
long long inf=(long long)1E17;
#define i_7 (long long)(1E9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}

//typedef long long ll;
long long po(long a, long b){
    if(b==0){
        return 1;
    }
    
    long long z = po(a,b/2);
    z = mod(z*z);
    if(b%2!=0){
        z = mod(a*z);
    }
    return z;
}

//配列のSIZEは問題ごとに定義する必要がある。
//const int SIZE=...
long long inv[SIZE+1];//各iの逆元を格納する配列。
long long kai[SIZE+1];//i!のmodを格納する配列。
long long invkai[SIZE+1];//各i!の逆元を格納する配列。
const int MOD=i_7;
void invinit(){//上の配列を初期化する関数。
    inv[1]=1;
    for(int i=2;i<=SIZE;i++){
        inv[i] = MOD - ((MOD/i)*inv[MOD%i])%MOD;
    }
    
    kai[0]=invkai[0]=1;
    for(int i=1;i<=SIZE;i++){
        kai[i]=(kai[i-1]*i)%MOD;
        invkai[i]=(invkai[i-1]*inv[i])%MOD;
    }
}

long long comb(long long a, long long b){
    if(b<0 || a<b){
        return 0;
    }
    return mod(kai[a]*mod(invkai[b]*invkai[a-b]));
}

int main(){
  invinit();
  using namespace std;
  long long n;
  cin>>n;
  long long c[n];
  REP(i,n){
    cin>>c[i];
  }
  long long ans = 0;
  for(long long k = 0; k<n; k++){
    for(long long d = 1; d<=(n-k-1); d++){
      long long temp = mod(d);
      temp *= c[k];
      temp = mod(temp);
      temp *= comb(n-k-1, d);
      temp = mod(temp);
      temp *= po(2, n+k+1);
      temp = mod(temp);
      ans += temp;
      ans = mod(ans);
    }
  }
  cout<<ans<<endl;  
  return 0;
}

Compiler output:
a.cc:29:15: error: 'SIZE' was not declared in this scope
   29 | long long inv[SIZE+1];//各iの逆元を格納する配列。
      |               ^~~~
a.cc:30:15: error: 'SIZE' was not declared in this scope
   30 | long long kai[SIZE+1];//i!のmodを格納する配列。
      |               ^~~~
a.cc:31:18: error: 'SIZE' was not declared in this scope
   31 | long long invkai[SIZE+1];//各i!の逆元を格納する配列。
      |                  ^~~~
a.cc: In function 'void invinit()':
a.cc:34:5: error: 'inv' was not declared in this scope; did you mean 'int'?
   34 |     inv[1]=1;
      |     ^~~
      |     int
a.cc:35:20: error: 'SIZE' was not declared in this scope
   35 |     for(int i=2;i<=SIZE;i++){
      |                    ^~~~
a.cc:39:5: error: 'kai' was not declared in this scope
   39 |     kai[0]=invkai[0]=1;
      |     ^~~
a.cc:39:12: error: 'invkai' was not declared in this scope
   39 |     kai[0]=invkai[0]=1;
      |            ^~~~~~
a.cc:40:20: error: 'SIZE' was not declared in this scope
   40 |     for(int i=1;i<=SIZE;i++){
      |                    ^~~~
a.cc: In function 'long long int comb(long long int, long long int)':
a.cc:50:16: error: 'kai' was not declared in this scope
   50 |     return mod(kai[a]*mod(invkai[b]*invkai[a-b]));
      |                ^~~
a.cc:50:27: error: 'invkai' was not declared in this scope
   50 |     return mod(kai[a]*mod(invkai[b]*invkai[a-b]));
      |                           ^~~~~~
Language: C++

#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
int n,a[200005],b[200005],aa[200005],bb[200005],rnk[200005],nrnk[200005],x[200005],cnt[200005];
vector<int> t1[200005],t2[200005];
void go(int b,int val)
{
    vector<int> v;
	for (int i=0;i<n;i++)
	{
	    rnk[i]=aa[i];
	    v.push_back(i);
	}
	int cr=1;
	for (int k=0;k<18;k++)
	{
		for (int i=0;i<=n;i++)
		{
			t1[i].clear();
			t2[i].clear();
		}
		for (int i:v)
		t1[rnk[(i+(1<<k))%n]].push_back(i);
		for (int _=0;_<=cr;_++)
		{
			for (int i:t1[_])
			t2[rnk[i]].push_back(i);
		}
		v.clear();
		for (int _=0;_<=cr;_++)
		{
			for (int i:t2[_])
			v.push_back(i);
		}
		cr=0;
		for (int i=0;i<n;i++)
		{
			if (!i)
			nrnk[v[i]]=0;
			else if (rnk[v[i]]!=rnk[v[i-1]] || rnk[(v[i]+(1<<k))%n]!=rnk[(v[i-1]+(1<<k))%n])
			cr++;
			nrnk[v[i]]=cr;
		}
		for (int i=0;i<n;i++)
		rnk[i]=nrnk[i];
	}
	int st=0,cur=0;
	while (st<n)
	{
		while (cur<n && aa[(v[st]+cur)%n]==bb[cur])
		cur++;
		if (cur==n)
		break;
		st++;
	}
	if (st==n)
	return;
	for (int i=0;i<n;i++)
	{
		if (aa[(v[st]+i)%n]!=bb[i])
		return;
	}
	for (int i=0;i<n;i++)
	{
		if (rnk[i]==rnk[v[st]])
		{
			cnt[i]++;
			x[i]|=(val<<b);
		}
	}
}
int main()
{
	scanf("%d",&n);
	for (int i=0;i<n;i++)
	scanf("%d",&a[i]);
	for (int i=0;i<n;i++)
	scanf("%d",&b[i]);
	for (int i=0;i<30;i++)
	{
		for (int j=0;j<n;j++)
		{
			aa[j]=((a[j]>>i)&1);
			bb[j]=((b[j]>>i)&1);
		}
		for (int j=0;j<2;j++)
		{
			go(i,j);
			for (int k=0;k<n;k++)
			aa[k]^=1;
		}
	}
	for (int i=0;i<n;i++)
	{
		if (cnt[i]==30)
		printf("%d %d\n",i,x[i]);
	}
}

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:4:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = int]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:132:14: note: called from here
  132 |       struct _Vector_impl
      |              ^~~~~~~~~~~~
Language: C++

#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <bits/stdc++.h>
using namespace std;
int n,a[200005],b[200005],aa[200005],bb[200005],rnk[200005],nrnk[200005],x[200005],cnt[200005];
vector<int> t1[200005],t2[200005];
void go(int b,int val)
{
    vector<int> v;
	for (int i=0;i<n;i++)
	{
	    rnk[i]=aa[i];
	    v.push_back(i);
	}
	int cr=1;
	for (int k=0;k<18;k++)
	{
		for (int i=0;i<=n;i++)
		{
			t1[i].clear();
			t2[i].clear();
		}
		for (int i:v)
		t1[rnk[(i+(1<<k))%n]].push_back(i);
		for (int _=0;_<=cr;_++)
		{
			for (int i:t1[_])
			t2[rnk[i]].push_back(i);
		}
		v.clear();
		for (int _=0;_<=cr;_++)
		{
			for (int i:t2[_])
			v.push_back(i);
		}
		cr=0;
		for (int i=0;i<n;i++)
		{
			if (!i)
			nrnk[v[i]]=0;
			else if (rnk[v[i]]!=rnk[v[i-1]] || rnk[(v[i]+(1<<k))%n]!=rnk[(v[i-1]+(1<<k))%n])
			cr++;
			nrnk[v[i]]=cr;
		}
		for (int i=0;i<n;i++)
		rnk[i]=nrnk[i];
	}
	int st=0,cur=0;
	while (st<n)
	{
		while (cur<n && aa[(v[st]+cur)%n]==bb[cur])
		cur++;
		if (cur==n)
		break;
		st++;
	}
	if (st==n)
	return;
	for (int i=0;i<n;i++)
	{
		if (aa[(v[st]+i)%n]!=bb[i])
		return;
	}
	for (int i=0;i<n;i++)
	{
		if (rnk[i]==rnk[v[st]])
		{
			cnt[i]++;
			x[i]|=(val<<b);
		}
	}
}
int main()
{
	scanf("%d",&n);
	for (int i=0;i<n;i++)
	scanf("%d",&a[i]);
	for (int i=0;i<n;i++)
	scanf("%d",&b[i]);
	for (int i=0;i<30;i++)
	{
		for (int j=0;j<n;j++)
		{
			aa[j]=((a[j]>>i)&1);
			bb[j]=((b[j]>>i)&1);
		}
		for (int j=0;j<2;j++)
		{
			go(i,j);
			for (int k=0;k<n;k++)
			aa[k]^=1;
		}
	}
	for (int i=0;i<n;i++)
	{
		if (cnt[i]==30)
		printf("%d %d\n",i,x[i]);
	}
}

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:5:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = int]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:132:14: note: called from here
  132 |       struct _Vector_impl
      |              ^~~~~~~~~~~~
Language: C++

#pragma GCC optimize("Ofast")
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"

using namespace std;

using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
using i8 = int8_t;
using i16 = int16_t;
using i32 = int32_t;
using i64 = int64_t;

constexpr char newl = '\n';
constexpr double eps = 1e-10;

#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define F0R(i,b) FOR(i,0,b)
#define RFO(i,a,b) for (int i = ((b)-1); i >=(a); i--)
#define RF0(i,b) RFO(i,0,b)
//#define fi first
//#define se second
#define debug(x) cout << #x << ": " << x << '\n';
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()

template<typename T1, typename T2> inline void chmin(T1& a, T2 b) { if (a > b) a = b; }
template<typename T1, typename T2> inline void chmax(T1& a, T2 b) { if (a < b) a = b; }
template<class T> void Print(vector<T> v) {
  F0R(i, v.size()) {
    cout << v[i] << ' ';
  }
  cout << newl;
}

#if 1

#include "MP.h"

// INSERT ABOVE HERE
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int N;
  cin >> N;

  vector<u64> as(N), bs(N);
  F0R(i, N) {
    cin >> as[i];
  }
  F0R(i, N) {
    cin >> bs[i];
  }

  // 全探索 O(N^2)
#if 0
  F0R(k, N) {

    u64 x = as[k] ^ bs[0];
    bool match = true;
    FOR(i, 1, N) {
      int ik = i + k;
      if (ik > N - 1) ik -= N;

      if ((as[ik] ^ bs[i]) != x) {
        match = false;
        break;
      }
    }

    if (match) {
      cout << k << ' ' << x << newl;
    }
  }
#endif

  // 数列の、前後の数のxorをとる

  // A = a0^a1, a1^a2 ... aN-1^a0
  // B = b0^b1, b1^b2 ... bN-1^b0

  // すると、 A[i] == B[(i+k)%N] になるパターンを探せば良いだけになる

  // さて複数位置一致する場合は、AもBもともに、ある数列の n 回の繰り返しになっていないといけない
  // A = C x n, B = D x n
  // C[i] == B[(i+l)%(N/n)]

  vector<u64> cs(N), ds(N);
  cs[0] = as.back()^as[0];
  F0R(i, N-1) {
    cs[i+1] = as[i] ^ as[i + 1];
  }
  ds[0] = bs.back() ^ bs[0];
  F0R(i, N - 1) {
    ds[i+1] = bs[i] ^ bs[i + 1];
  }

  //Print(ds);
  MP<vector<u64>> mp(ds);
  //Print(mp.a);

  cs.insert(cs.end(), rng(cs));
  //Print(cs);

  auto r = mp.findAll(cs);
  for (auto i : r) {
    if (i >= N) continue;
    cout << i << " " << (bs[0] ^ as[i]) << newl;
  }
}
#endif


Compiler output:
a.cc:40:10: fatal error: MP.h: No such file or directory
   40 | #include "MP.h"
      |          ^~~~~~
compilation terminated.
Language: C++

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

const int MAXN = 2e5 + 5;
const double M_PI = acos(-1);

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)

const int MAX = 1 << 19;

typedef complex<double> comp;

int n;
comp omega[MAX];
comp a1[MAX], a2[MAX];
comp z1[MAX], z2[MAX];

void fft(comp *a, comp *z, int m = n) {
  if (m == 1) {
    z[0] = a[0];
  } else {
    int s = n/m;
    m /= 2;

    fft(a, z, m);
    fft(a+s, z+m, m);

    REP(i, m) {
      comp c = omega[s*i] * z[m+i];
      z[m+i] = z[i] - c;
      z[i] += c;
    }
  }
}

void mult(vector <int> a, vector <int> b, vector <int> &c) {
  int len = (int)a.size() + (int)b.size() - 1;
  n = len;
  while (n & (n-1)) ++n;
  assert(n <= MAX);

  REP(i, n) a1[i] = 0;
  REP(i, n) a2[i] = 0;
  REP(i, a.size()) a1[i] = a[i];
  REP(i, b.size()) a2[i] = b[i];

  REP(i, n) omega[i] = polar(1.0, 2*M_PI/n*i);
  fft(a1, z1, n);
  fft(a2, z2, n);

  REP(i, n) omega[i] = comp(1, 0) / omega[i];
  REP(i, n) a1[i] = z1[i] * z2[i] / comp(n, 0);
  fft(a1, z1, n);

  REP(i, len) c.push_back((long long)round(z1[i].real()) );
}
int ans[400005][33];
int arr[200005];
int brr[400005];
int crr[400005];
int main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n;
    cin>>n;
    for(int i=0;i<n;i++)cin>>arr[i];
    for(int i=0;i<n;i++)cin>>crr[i];
    for(int i=n-1;i>=0;i--)brr[i+n] = brr[i] = crr[n-1-i];
    for(int j=0;j<31;j++){
        vector<int>a,b,c;
       for(int i=0;i<n;i++){
            if(arr[i]&(1<<j))a.push_back(-1);
            else a.push_back(1);
        }
        for(int i=0;i<n+n-1;i++){
            if(brr[i]&(1<<j))b.push_back(-1);
            else b.push_back(1);
        }
        mult(a,b,c);
        /*
        for(int x:a)cout<<x<<" ";
        cout<<endl;
        for(int x:b)cout<<x<<" ";
        cout<<endl;
        for(int x:c)cout<<x<<" ";
        cout<<endl;
        */
        for(int i=0;i<n;i++){
            if(c[i+n-1]==n)ans[i][j] = 1;
            if(c[i+n-1]==-n)ans[i][j] = 1;
        }
        /*
        for(long long &x:b)x*=-1;
        multiply(a,b,c);
        for(int i=0;i<n;i++){
            if(c[i+n-1]==n)ans[i][j] = 1;
        }
        */
    }
    for(int i=0;i<n;i++){
        int cnt = 1;
        for(int j=0;j<31;j++){
            if(ans[i][j]==0){
                cnt = 0;
            }
        }
        if(cnt){
            cout<<i<<" "<<(crr[0]^arr[i])<<endl;

        }
    }
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
                 from a.cc:2:
a.cc:6:14: error: expected unqualified-id before numeric constant
    6 | const double M_PI = acos(-1);
      |              ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define ld long double
#define mod ((ll)1e9+7)
#define inf ((ll)1e18+5)
#define maxx ((ll)1e6+5)
#define pb push_back
#define endl "\n"
#define time(i) cout<<"\nTime Elapsed "<<i<<" : " << 1.0*clock() / CLOCKS_PER_SEC << " sec\n";
#define usefile freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
#define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define test ll t; cin>>t; while(t--)
ll exp(ll x,ll y,ll p){ ll res=1; while(y) {if(y%2) res=(res*x%p)%p; x=(x*x)%p; y/=2; } return res;}
ll expm(ll x,ll y){ ll res=1; while(y) {if(y%2) res=(res*x%mod)%mod; x=(x*x)%mod; y/=2; } return res;}
/*
bool sv[maxx]={0};    // returns 0 if a num is prime
int sp[maxx]={0};     // gives smallest prime factor of the number
void Sieve() {for(int i= 2; i< maxx; i+= 2) sv[i]=1,sp[i] = 2;sv[2]=0;for(ll i = 3; i < maxx; i += 2){if (!sv[i]){sp[i] = i;for (ll j = i; (j*i) < maxx; j += 2){if (!sv[j*i])sv[j*i] = true, sp[j*i] = i;}}}}
ll fact[maxx]={0}; // returns factorial of that number
void facto() {fact[0]=1;fact[1]=1;for(int i=2;i<maxx;i++)fact[i]=(fact[i-1]*i)%mod;}
ll ncrm(ll n,ll r) {ll res=1; res=fact[n]; res=(res*(expm(fact[r],mod-2)))%mod; res=(res*(expm(fact[n-r],mod-2)))%mod; return res;}
ll inv[maxx];   // returns the modular inverse of number
void inversify( ll m){inv[1]=1;for(int i=2;i<maxx;i++){inv[i]= m- m/i*inv[m%i]%m;}}
ll ncr(ll n,ll r,ll m){int ans=1;for (int i = 0; i < r; i++){ans=ans*(n-i)%m*inv[i+1]%m;}return ans;}
*/
signed main(){
  fast;
  //usefile;
  //test
  {
    int n;
    vector<int> a(n),ax(n);
    vector<int> b(n), bx(n);
    for(int i=0;i<n;i++){
      cin>>a[i];
    }
    for(int i=0;i<n;i++){
      cin>>b[i];
    }
    for(int i=0;i<2*n-2;i++)
      ax[i]=a[i%n]^a[(i+1)%n];
    for(int i=0;i<n-1;i++)
      bx[i]=b[i%n]^b[(i+1)%n];
    int i=0,j=-1;
    while(i<n-1)
    {
      while(j>=0 && bx[i]!=bx[j]) j=bx[j];
      i++;j++;
      bx[i]=j;
    }
    vector<int> ans;

    int i=0,j=0;
    while(i<2*(n-1))
    {
      while(j>=0 && ax[i]!=bx[j]) j=bx[j];
      i++;j++;
      if(j==n-1)
        {
          ans.push_back(i-(n-1));
          j=bx[j];
        }
    }
    for(auto i:ans) cout<<i<<" "<<(ax[i]^bx[0])<<endl;

    
    
  }
  //time("");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:9: error: redeclaration of 'long long int i'
   55 |     int i=0,j=0;
      |         ^
a.cc:46:9: note: 'long long int i' previously declared here
   46 |     int i=0,j=-1;
      |         ^
a.cc:55:13: error: redeclaration of 'long long int j'
   55 |     int i=0,j=0;
      |             ^
a.cc:46:13: note: 'long long int j' previously declared here
   46 |     int i=0,j=-1;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int,bool>;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define IFOR(i,a,b) for(int i=(b-1);i>=(a);--i)
#define RPT(i,a,b) for(int i=(a);i<((a)+(b));++i)
#define IRPT(i,a,b) for(int i=((a)+(b)-1);i>=(a);--i)
#define BITBOOL(x,a) (((x)>>(a))&1)
int main(){
  int N;
  cin >> N;
  vector<bitset<35>> a(N,0); vector<bitset<35>> b(N,0); 
  RPT(i,0,N) {int atmp;cin >> atmp;a[i]=bitset<35>(atmp);}
  RPT(i,0,N) {int btmp;cin >> btmp;b[i]=bitset<35>(btmp);}
  ll rangemax_ = 1LL << 30 - 1;
  set<int> k_ok; vector<vector<P>> XX(35);
  RPT(i,0,N) k_ok.insert(i); 
  vector<vector<vector<bool>>> XXX(N+5,vector<vector<bool>> (35,vector<bool>(2,false))  );
  FOR(i,0,30){
    bitset<200010> ad(0), bd(0); set<int> k_okpart;
    FOR(j,0,N) ad[j] = a[j][i];
    FOR(j,0,N) bd[j] = b[j][i];
    //FOR(j,0,N) cout << ad[j]; cout << endl;
    auto F=[&](int swch){
      FOR(l,0,N){
        int tmp=1;
        FOR(m,0,N){if(ad[m]!=bd[m]){tmp = 0; m = N+100;}}
        if(tmp) {
          XX[i].push_back(P(l,(bool)swch)); 
          k_okpart.insert(l);
          XXX[l][i][swch]=true;
        }
        //bool sw = ad[N-1];
        //{ad <<= 1;ad[0] = sw;}
        bool sw = ad[0];
        {ad >>= 1;ad[N-1] = sw;}
      }
    };
    F(0);
    //FOR(j,0,N) cout << ad[j]; cout << endl;
    FOR(j,0,N) ad[j] = (bool)(ad[j]^1);
    //FOR(j,0,N) cout << ad[j]; cout << endl;
    //FOR(j,0,N) cout << bd[j]; cout << endl << endl;
    F(1);
    if(k_okpart.size()==0) {return 0;}
    for(auto x : k_okpart){
      if(k_ok.find(x)==k_ok.end()) k_okpart.erase(x);
    }
    k_ok = k_okpart; //for(auto x: k_ok) cout << x << endl;
    if(k_ok.size()==0) {return 0;}
  }
  vector<queue<ll>> QQ(N);
  for(auto x: k_ok){
    QQ[x].push(0);
    IFOR(i,0,30){
      queue<ll> qqq;
      while(!QQ[x].empty()){
        ll y = QQ[x].front();
        QQ[x].pop();
        FOR(j,0,2){
          ll z = ((ll)j)<<i;
          if(XXX[x][i][j]){
            qqq.push(y+z);
          }
        }
      }
      QQ[x] = qqq;
    }
  }
  for(auto x: k_ok) {
    //cout << x << endl;
    while(!QQ[x].empty()){
      ll y = QQ[x].front();
      QQ[x].pop();
      //cout << x << " " << y << endl;
      printf("%d %d\n",x,y)
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:78:28: error: expected ';' before '}' token
   78 |       printf("%d %d\n",x,y)
      |                            ^
      |                            ;
   79 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define rep(i,m,n) for(ll i = (m); i <= (n); i++)
#define zep(i,m,n) for(ll i = (m); i < (n); i++)
#define rrep(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x,m,n) for(ll i = (m); i <= n; i++){cout << (x[i]) << " ";} cout<<endl;

ll base[2] = {10007, 10009};
ll mod[2] = {1000000007, 1000000009};

int main(){
	cin.tie(0); ios::sync_with_stdio(false);
	
	ll n;
	cin >> n;
	ll a[n], b[n];
	zep(i, 0, n){cin >> a[i];}
	zep(i, 0, n){cin >> b[i];}
	ll aa[n][50], bb[n][50];
	zep(i, 0, n){
		zep(d, 0, 31){
			aa[i][d] = (a[i] & (1LL << d))? 1 : 0;	
			bb[i][d] = (b[i] & (1LL << d))? 1 : 0;	
		}
	}
	
	ll fb[2][n];
	fb[0][0] = 1;
	fb[1][0] = 1;
	zep(i, 1, n){
		zep(j, 0, 2){
			fb[j][i] = (fb[j][i-1]*base[j])%mod[j];
		}
	}
	
	bool ans[n];
	zep(k, 0, n){ans[k] = true;}
	ll x[n];
	memset(x, 0, sizeof(x));
	
	zep(d, 0, 31){
		ll hash[2] = {0, 0};

		zep(i, 0, n){
			zep(j, 0, 2){
				hash[j] += ((bb[i][d]+1)*fb[j][n-1-i])%mod[j];
				hash[j] %= mod[j];
			}
		}
		
		bool flag[n];
		memset(flag, 0, sizeof(flag));
		
		//0^
		ll tmp[2] = {0, 0};
		zep(i, 0, n){
			zep(j, 0, 2){
				tmp[j] += ((aa[i][d]+1)*fb[j][n-1-i])%mod[j];
				tmp[j] %= mod[j];
			}
		}
		
		rep(k, 0, n){
			if(tmp[0] == hash[0] && tmp[1] == hash[1]){
				flag[k] = true;
			}
			
			zep(j, 0, 2){
				tmp[j] += mod[j]-(fb[j][n-1]*(aa[k][d]+1))%mod[j];
				tmp[j] %= mod[j];
				tmp[j] *= base[j];
				tmp[j] %= mod[j];
				tmp[j] += aa[k][d]+1;
				tmp[j] %= mod[j];
			}
		}
		
		//1^
		tmp = {0, 0};
		zep(i, 0, n){
			zep(j, 0, 2){
				tmp[j] += ((2-aa[i][d])*fb[j][n-1-i])%mod[j];
				tmp[j] %= mod[j];
			}
		}
		
		rep(k, 0, n){
			if(tmp[0] == hash[0] && tmp[1] == hash[1]){
				flag[k] = true;
				x[k] |= (1LL << d);
			}
			zep(j, 0, 2){
				tmp[j] += mod[j]-(fb[j][n-1]*(2-aa[k][d]))%mod[j];
				tmp[j] %= mod[j];
				tmp[j] *= base[j];
				tmp[j] %= mod[j];
				tmp[j] += 2-aa[k][d];
				tmp[j] %= mod[j];
			}
		}
		
		zep(i, 0, n){
			if(!flag[i]){
				ans[i] = false;
			}
		}
	}
	
	zep(k, 0, n){
		if(ans[k]){
			cout << k << " " << x[k] << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:84:21: error: assigning to an array from an initializer list
   84 |                 tmp = {0, 0};
      |                 ~~~~^~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <string>
#include <set>
#include <bitset>
#include <unordered_map>

using namespace std;
using ll = long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
template <class T>
using Vvec = vector<vector<T> >;

template <class T>
void debug(T& v)
{
    for(auto& x: v) cout << x << " ";
    cout << endl;
}

// KMP
template <class T>
std::vector<int> KMP(T& S)
{
    std::vector<int> A(S.size()+1);
    A[0] = -1;
    int j = -1;

    for(int i=0; i<S.size(); i++){
        while(j > -1 && S[j] != S[i]) j = A[j];
        j++;
        if(S[i+1] == s[j]) A[i+1] = A[j];
        else A[i+1] = j;
    }

    return A;
}

// detect T from S
template <class Type>
std::vector<int> matchedIndex(Type& S, Type& T)
{
    std::vector<int> ret;
    std::vector<int> A = KMP(T);

    for(int m = 0, i = 0; m + T.size() <= S.size();){
        while(m+i < S.size() && i < T.size() && S[m+i] == T[i]) i++;
        if(i == T.size()) ret.push_back(m);
        m += std::max(i - A[i], 1);
        i = std::max(A[i], 0);
    }

    return ret;
}

int main()
{
    int N;
    cin >> N;
    vector<int> a(N), b(N);
    for(auto& x: a) cin >> x;
    for(auto& x: b) cin >> x;
    a.push_back(a[0]);
    b.push_back(b[0]);
    
    vector<int> c(N), d(2*N);
    for(int i=0; i<N; i++){
        c[i] = a[i] ^ a[i+1];
        d[i] = b[i] ^ b[i+1];
        d[N+i] = d[i];
    }
    d.pop_back();

    vector<int> index = matchedIndex(d, c);
    for(auto& k: index){
        k = (N-k)%N;
    }
    sort(index.begin(), index.end());

    for(auto& k: index){
        cout << k << " " << (a[k] ^ b[0]) << endl;
    }
}

Compiler output:
a.cc: In function 'std::vector<int> KMP(T&)':
a.cc:36:22: error: 's' was not declared in this scope
   36 |         if(S[i+1] == s[j]) A[i+1] = A[j];
      |                      ^
Language: C++

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

vector<int> to_xor(vector<int> x)
{
    int n = x.size();
    vector<int> ret(n);
    for (int i = 0; i < n; i++)
    {
        ret[i] = x[i] ^ x[(i + 1) % n];
    }
    return ret;
}

template <typename T>
class MP
{
    long long n;
    T query;
    vector<long long> table;

public:
    MP(const T &str)
    {
        this->query = T(str);
        this->n = this->query.size();
        this->table = vector<long long>(this->n + 1, -1);
        long long j = -1;
        for (long long i = 0; i < this->n; i++)
        {
            while (j != -1 && this->query[j] != this->query[i])
            {
                j = this->table[j];
            }
            j++;
            this->table[i + 1] = j;
        }
    }

    int operator[](const int i)
    {
        return this->table[i];
    }

    vector<long long> find_from(const T &document)
    {
        vector<long long> res;
        long long j = 0;
        for (long long i = 0; i < s.size(); i++)
        {
            while (j != -1 && this->query[j] != document[i])
            {
                j = this->table[j];
            }
            j++;
            if (j == this->n)
            {
                res.push_back(i - j + 1);
                j = this->table[j];
            }
        }
        return res;
    }
};

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

    vector<int> a(N);
    for (int &aa : a)
    {
        cin >> aa;
    }
    vector<int> axor = to_xor(a);
    axor.insert(axor.end(), axor.begin(), axor.end());

    vector<int> b(N);
    for (int &bb : b)
    {
        cin >> bb;
    }
    vector<int> bxor = to_xor(b);

    MP<vector<int>> mp(bxor);
    for (int i : mp.find_from(axor))
    {
        if (i >= N)
        {
            continue;
        }
        cout << i << " " << (a[i] ^ b.front()) << endl;
    }
}


Compiler output:
a.cc: In member function 'std::vector<long long int> MP<T>::find_from(const T&)':
a.cc:49:35: error: 's' was not declared in this scope
   49 |         for (long long i = 0; i < s.size(); i++)
      |                                   ^
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

public class ABC150F {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] sa = br.readLine().split(" ");
		int n = Integer.parseInt(sa[0]);
		sa = br.readLine().split(" ");
		int[] a = new int[n + 1];
		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(sa[i]);
		}
		a[n] = a[0];
		sa = br.readLine().split(" ");
		int[] b = new int[n + 1];
		for (int i = 0; i < n; i++) {
			b[i] = Integer.parseInt(sa[i]);
		}
		b[n] = b[0];
		br.close();

		int[] ax = new int[n];
		int[] bx = new int[n * 2 - 1];
		for (int i = 0; i < n; i++) {
			ax[i] = a[i] ^ a[i + 1];
			bx[i] = b[i] ^ b[i + 1];
		}
		System.arraycopy(bx, 0, bx, n, n - 1);

		MP mp = new MP(ax);
		List<Integer> list = mp.findAllFrom(bx);
		PrintWriter pw = new PrintWriter(System.out);
		if (!list.isEmpty() && list.get(0) == 0) {
			list.remove(0);
			list.add(n);
		}
		for (int i = list.size() - 1; i >= 0; i--) {
			int j = n - list.get(i);
			pw.println(j + " " + (a[j] ^ b[0]));
		}
		pw.flush();
	}

	static class MP {
		int n;
		int[] arr;
		int[] a;

		public MP(int[] arr1) {
			arr = arr1;
			n = arr.length;
			a = new int[n + 1];
			a[0] = -1;
			int j = -1;
			for (int i = 0; i < n; i++) {
				while (j >= 0 && arr[i] != arr[j]) {
					j = a[j];
				}
				j++;
				a[i + 1] = j;
			}
		}

		List<Integer> findAllFrom(int[] arr2) {
			List<Integer> ret = new ArrayList<>();
			int j = 0;
			for (int i = 0; i < arr2.length; i++) {
				while (j >= 0 && arr2[i] != arr[j]) {
					j = a[j];
				}
				j++;
				if (j == n) {
					ret.add(i - j + 1);
					j = a[j];
				}
			}
			return ret;
		}
	}
}


Compiler output:
Main.java:7: error: class ABC150F is public, should be declared in a file named ABC150F.java
public class ABC150F {
       ^
1 error
Language: C++

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

using ll = long long;

using namespace std;

using bs = bitset<200010>;

inline void rotate1(bs & b, int n) {
    b = b << 1 | b >> (n - 1);
}

int main() {
    int n;
    cin >> n;
    bs a[30], b[30];
    for (int i=0; i<n; i++) {
        ll ai; cin >> ai;
        for (int j=0; j<30; j++) {
            a[j][i] = ((ai >> j) & 1);
        }
    }
    for (int i=0; i<n; i++) {
        ll bi; cin >> bi;
        for (int j=0; j<30; j++) {
            b[j][i] = ((bi >> j) & 1);
        }
    }
    ll ans[n];
    fill(ans, ans+n, 0);
    for (int i=0; i<30; i++) {
        bs x(a[i]);
        for (int j=0; j<n; j++) {
            if (ans[j] < 0) continue;
            if (b[i] == x.flip()) ans[j] ^= (1ll << i);
            else if (b[i] != x) ans[j] = -1;
            rotate(x, n);
        }
    }
    for (int i=0; i<n; i++) {
        if (ans[i] < 0) continue;
        cout << i + 1 << ' ' << ans[i] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:19: error: no matching function for call to 'rotate(bs&, int&)'
   42 |             rotate(x, n);
      |             ~~~~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:1348:5: note: candidate: 'template<class _FIter> _FIter std::_V2::rotate(_FIter, _FIter, _FIter)'
 1348 |     rotate(_ForwardIterator __first, _ForwardIterator __middle,
      |     ^~~~~~
/usr/include/c++/14/bits/stl_algo.h:1348:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:260:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::rotate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator)'
  260 | rotate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last);
      | ^~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:260:1: note:   candidate expects 4 arguments, 2 provided
Language: C++

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


bool isprime(ll val) {
    if (val <= 1)return false;
    for (ll i = 2; i*i <= val; i++) {
        if (val%i == 0LL)return false;
    }
    return true;
}

signed main(){
    ios::sync_with_stdio(false);
	cin.tie(0);
    cout << fixed << setprecision(20);

    ll n;
    cin>>n;
    ll a[n],b[n+n];
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    for(int i=0;i<n;i++){
        cin>>b[i];
    }
    for(int i=0;i<n;i++){
        b[i+n] = b[i];
    }
    vector<ll> mod;
    for(ll i=1e9+7;i<1e9+30;i++){
        if(isprime(i)) mod.push_back(i);
    }
    ll mul[3];
    mul[0]=10007, mul[1]=10009, mul[2]=1007;
    ll h[3]={}, base[3]={1,1,1};
    ll x[3]={};
    for(int i=1;i<n;i++){
        for(int j=0;j<3;j++){
            if(i>1) base[j] = (base[j]*mul[j]) % mod[j];
            h[j] = (h[j]*mul[j] + (a[i]^a[i-1])) % mod[j];
            x[j] = (x[j]*mul[j] + (b[i]^b[i-1])) % mod[j];
        }
    }
    bool pos = true;
    for(int j=0;j<3;j++){
        if(h[j] != x[j]) pos = false;
    }
    vector<pair<ll,ll>> ans;
    if(pos){
        cout << 0 << " " << (a[0]^b[0]) << "\n";
    }
    for(int i=1;i<n;i++){
        bool pos = true;
        for(int j=0;j<3;j++){
            x[j] += mod[j] - (base[j] * (b[i]^b[i-1])) % mod[j];
            x[j] %= mod[j];
            x[j] = (x[j]*mul[j] + (b[n-1+i]^b[n-2+i])) % mod[j];
            if(x[j] != h[j]) pos = false;
        }
        if(pos){
            ans.push_back({n-1, (a[0]^b[i])});
        }
    }
    sort(ans.begin(),ans.end());
    for(auto i:ans){
        cout << i.first << " " << ans.second << "\n";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:68:39: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'second'
   68 |         cout << i.first << " " << ans.second << "\n";
      |                                       ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#include "library/debug.cpp"

struct RollingHash {
    ll base1;
    ll base2;
    ll mod1;
    ll mod2;
    vector<ll> hash1;
    vector<ll> hash2;
    vector<ll> pow1;
    vector<ll> pow2;

    RollingHash()
        : base1(1009), base2(1007), mod1(1000000007), mod2(1000000009) {}

    void init(vector<ll> s) {
        int n = s.size();

        hash1.assign(n + 1, 0);
        hash2.assign(n + 1, 0);
        pow1.assign(n + 1, 1);
        pow2.assign(n + 1, 1);

        for (int i = 0; i < n; i++) {
            hash1[i + 1] = (hash1[i] + s[i]) * base1 % mod1;
            hash2[i + 1] = (hash2[i] + s[i]) * base2 % mod2;
            pow1[i + 1] = pow1[i] * base1 % mod1;
            pow2[i + 1] = pow2[i] * base2 % mod2;
        }
    }

    pair<ll, ll> get(int l, int r) {
        ll t1 = ((hash1[r] - hash1[l] * pow1[r - l]) % mod1 + mod1) % mod1;
        ll t2 = ((hash2[r] - hash2[l] * pow2[r - l]) % mod2 + mod2) % mod2;
        return make_pair(t1, t2);
    }
};

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

    ll n;
    cin >> n;
    vector<ll> a(n), b(n), s(n), t(2 * n);
    vector<pair<ll, ll>> ans;
    rep(i, 0, n) cin >> a[i];
    rep(i, 0, n) cin >> b[i];
    rep(i, 0, n) {
        s[i] = a[i] ^ a[(i + 1) % n];
        t[i] = t[i + n] = b[i] ^ b[(i + 1) % n];
    }
    RollingHash x, y;
    x.init(s);
    y.init(t);
    pair<ll, ll> sh = x.get(0, n);

    rep(i, 0, n) {
        if (sh == y.get(i, i + n)) {
            ans.emplace_back((n - i) % n, a[0] ^ b[i]);
        }
    }

    sort(ans.begin(), ans.end());
    for (auto p : ans) {
        cout << p.first << ' ' << p.second << endl;
    }

    return 0;
}


Compiler output:
a.cc:5:10: fatal error: library/debug.cpp: No such file or directory
    5 | #include "library/debug.cpp"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <stack>
#include <queue>
#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <iomanip>        //do setprecision
#include <ctime>
#include <complex>
using namespace std;

#define FOR(i,b,e) for(int i=(b);i<(e);++i)
#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)
#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)
#define REP(x, n) for(int x = 0; x < (n); ++x)

#define ST first
#define ND second
#define PB push_back
#define PF push_front
#define MP make_pair
#define LL long long
#define ULL unsigned LL
#define LD long double
#define pii pair<int,int>
#define pll pair<LL,LL>
#define vi vector<int>
#define vl vector<LL>
#define vll vector<vl>
#define vii vector<vi>

const double pi = 3.14159265358979323846264;
const int mod=1000000007;

int main(){
    int n;
    cin>>n;
    vi a(n);
    vi b(n);
    vll r(33,vl(n,0));
    FOR(i,0,n){
        cin>>a[i];
        FOR(j,0,30){
            if((a[i]>>j)&1){
                r[j][i]++;
            }
        }
    }
    FOR(i,0,n){
        cin>>b[i];
    }
    FOR(k,0,n){
        int f=a[0]^b[k],ff=1;
        FOR(i,0,n-k){
            int j=i+k;
            if(a[i]^b[j]!=f){
                ff=0;
                break;
            }
        }
        if(ff){
            FOR(i,n-k,n){
            int j=i-n+k;
            if(a[i]^b[j]!=f){
                ff=0;
                break;
            }
        }
        }
        if(ff){
            cout<<k<" "<<f<<endl;
        }
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:82:24: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator<<'
   82 |             cout<<k<" "<<f<<endl;
      |                     ~~~^~~
      |                     |    |
      |                     |    int
      |                     const char [2]
Language: C++

#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
void tostr(ll x,string& res){while(x)res+=('0'+(x%10)),x/=10; reverse(ALL(res)); return;}
template<class T> inline bool chmax(T& a,T b){ if(a<b){a=b;return 1;}return 0; }
template<class T> inline bool chmin(T& a,T b){ if(a>b){a=b;return 1;}return 0; }
//template end



int main(){
   int n; scanf("%d",&n);
   vector<int> a(n),b(n);
   rep(i,0,n)scanf("%d",&a[i]);
   rep(i,0,n)scanf("%d",&b[i]);
   int add,c,cnt;
   rep(k,0,n){
      c=a[0]^b[0]; cnt=1;
      rep(i,1,n)if((a[i]^b[i])!=c){cnt=0; break;}
      if(cnt)printf("%d %d\n",k,c);
      add=a.front(); a.erase(a.begin());
      a.push_back(add);
   }
   return 0;
}


Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:4:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = int]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:132:14: note: called from here
  132 |       struct _Vector_impl
      |              ^~~~~~~~~~~~
Language: C++

int basis[d]; // basis[i] keeps the mask of the vector whose f value is i

int sz; // Current size of the basis

void insertVector(int mask) {
	for (int i = 0; i < d; i++) {
		if ((mask & 1 << i) == 0) continue; // continue if i != f(mask)

		if (!basis[i]) { // If there is no basis vector with the i'th bit set, then insert this vector into the basis
			basis[i] = mask;
			++sz;
			
			return;
		}

		mask ^= basis[i]; // Otherwise subtract the basis vector from this vector
	}
}

Compiler output:
a.cc:1:11: error: 'd' was not declared in this scope
    1 | int basis[d]; // basis[i] keeps the mask of the vector whose f value is i
      |           ^
a.cc: In function 'void insertVector(int)':
a.cc:6:29: error: 'd' was not declared in this scope
    6 |         for (int i = 0; i < d; i++) {
      |                             ^
a.cc:9:22: error: 'basis' was not declared in this scope
    9 |                 if (!basis[i]) { // If there is no basis vector with the i'th bit set, then insert this vector into the basis
      |                      ^~~~~
a.cc:16:25: error: 'basis' was not declared in this scope
   16 |                 mask ^= basis[i]; // Otherwise subtract the basis vector from this vector
      |                         ^~~~~
Language: Java

import java.util.Scanner;

public class Solution {
    public static void main(String [] args) {
        Scanner scan = new Scanner(System.in);
        int L = scan.nextInt();
        int R = scan.nextInt();
        scan.close();
        
        int xored  = L ^ R;
        int significantBit = 31 - Integer.numberOfLeadingZeros(xored);
        int result = (1 << (significantBit + 1)) - 1;

        System.out.println(result);
    }
}

Compiler output:
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
       ^
1 error
Language: C++

#if __has_include("debug.h")
    #include "debug.h"
#else  
#include <bits/stdc++.h>
using namespace std;
#define d(...) 2;
#endif

#define int long long int
#define ld long double

#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl "\n"      

#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define ff first
#define ss second
#define eps 1e-10
#define PI acos(-1LL)

#define gcd(a,b)            __gcd((a),(b))
#define lcm(a,b)            ((a*b)/gcd(a,b))

void solve();

int32_t main()
{
    #ifdef DEBUG
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
    #endif 

    fast
    
    int t = 1;
	// cin>>t;
	
	while(t--)
	    solve();
	return 0;  
}

void solve()
{
	int i,j;
	string s,t;
	cin>>s>>>t;

	t+=s;
	cout<<t<<endl;

}

Compiler output:
a.cc: In function 'void solve()':
a.cc:48:17: error: expected primary-expression before '>' token
   48 |         cin>>s>>>t;
      |                 ^
Language: Java

import java.util.*;
public class next
{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String huruf = scan.next();
        String huruf2 = scan.next();
        System.out.println(huruf2+huruf);
    }
}


Compiler output:
Main.java:2: error: class next is public, should be declared in a file named next.java
public class next
       ^
1 error
Language: C++

#include<stdio.h>

int main(){
	
	char S[20], T[20];
	scanf("%s %s", S, T);
	printf("%s%s\n", T, S)
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:31: error: expected ';' before 'return'
    7 |         printf("%s%s\n", T, S)
      |                               ^
      |                               ;
    8 | 
    9 |         return 0;
      |         ~~~~~~