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

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
const double pi = 3.14159265358979323846;
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main()
{
  speed;
  ll n,t=0,i;
  
  cin>>n;
  ll a[n];
  
  for(i=0;i<n;i++)
  {
    cin>>a[i];
    t^=a[i];
  }
  
  for(i=0;i<n;i++)
    cout<<t^a[i]<<" ";
  
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: invalid operands of types 'll' {aka 'long long int'} and 'const char [2]' to binary 'operator<<'
   23 |     cout<<t^a[i]<<" ";
      |             ~~~~^~~~~
      |                |  |
      |                |  const char [2]
      |                ll {aka long long int}
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
const double pi = 3.14159265358979323846;
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main()
{
  speed;
  ll n,t=0;
  
  cin>>n;
  ll a[n];
  
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
    t^=a[i];
  }
  
  for(int i=0;i<n;i++)
    cout<<t^a[i]<<" ";
  
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: invalid operands of types 'll' {aka 'long long int'} and 'const char [2]' to binary 'operator<<'
   23 |     cout<<t^a[i]<<" ";
      |             ~~~~^~~~~
      |                |  |
      |                |  const char [2]
      |                ll {aka long long int}
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
const double pi = 3.14159265358979323846;
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main()
{
  speed;
  ll n,t=0;
  
  cin>>n;
  ll a[n];
  
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
    t^=a[i];
  }
  
  for(int i:a)
  {
    cout<<t^(*i)<<" ";
  }
  
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: invalid type argument of unary '*' (have 'int')
   24 |     cout<<t^(*i)<<" ";
      |              ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
const double pi = 3.14159265358979323846;
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main()
{
  speed;
  ll n,t=0,p=0;
  
  cin>>n;
  ll a[n];
  
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
    t^=a[i];
  }
  
  for(int i:a)
  {
    cout<<t^i<<" ";
  }
  
  return 0;
}
  

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

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

int main() {
  if (N==4) {
    cout << 26 << 5 << 7 << 22 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'N' was not declared in this scope
    5 |   if (N==4) {
      |       ^
Language: C++

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

int main() {
  if (N==4) {
    cout << 26 << 5 << 7 << 22 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'N' was not declared in this scope
    5 |   if (N==4) {
      |       ^
a.cc:7:2: error: expected '}' at end of input
    7 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <sstream>
#include <cstdio>
#include <stdlib.h>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#define rep(i,n) for (int i=0;i<(n);++i)
using namespace std;

int main(){
  int n;
  cin>>n;
  vector<int>a(n);
  rep(i,n) cin>>a[i];
  int sum=0;
  rep(i,n) sum ^= a[i];
  rep(i,n) a[i] ^= s;
  rep(i,n) cout<<a[i]<< " ";
  cout<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: 's' was not declared in this scope
   19 |   rep(i,n) a[i] ^= s;
      |                    ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

int main()
{

  ll N;

  cin >> N;

  int A = 0;

  vector<int> B(N);

  for (int i = 0; i < N; i++)
  {

    int a;

    cin >> a;

    A ^= a;

    B.push_back(a);
  }

  for (int i = 0; i < N; i++)
  {

    cout << B[i] ^ A << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:22: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   32 |     cout << B[i] ^ A << endl;
      |                    ~~^~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    long int a[200001];
    int N;
    cin>>N;long int s=0;
    for(int i=0;i<N;i++)
    {
        cin>>a[i];
        s^=a[i];
    }
    for(int i=0;i<N;i++)
        cout<<s^a[i]<<" ";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: invalid operands of types 'long int' and 'const char [2]' to binary 'operator<<'
   16 |         cout<<s^a[i]<<" ";
      |                 ~~~~^~~~~
      |                    |  |
      |                    |  const char [2]
      |                    long int
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define N 100000
#define M 1000000007
#define f(i, a, b) for (ll i = (ll)a; i <= (ll)b; i++)
#define rf(i, a, b) for (ll i = (ll)a; i >= (ll)b; i--)
#define po pop_back
#define pb push_back
#define lb lower_bound
#define fi first
#define se second
#define mp make_pair
#define bs binary_search
#define debug(x) cout << #x << " = " << x << endl
#define ub upper_bound
#define ibs ios_base::sync_with_stdio(false)
#define cti cin.tie(0)
#define all(x) x.begin(), x.end()
#define PI 3.14159265
#define cot cout.tie(0)
using namespace std;
/**
  * @author :: Rishabh
  *
  */
int main()
{
	ibs;
	cti;
	ll n;
	cin>>n;
	ll a[n];
	int c=0;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		c=c^a[i];
	}
	for(int i=0;i<n;i++)
	{
		cout<<c^a[i]<<" ";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:29: error: invalid operands of types 'long long int' and 'const char [2]' to binary 'operator<<'
   41 |                 cout<<c^a[i]<<" ";
      |                         ~~~~^~~~~
      |                            |  |
      |                            |  const char [2]
      |                            long long int
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int N,tmp;
  cin>>N;
  vector<int> vec(N);
  rep(i,N){cin >> vec.at(i);
          tmp=tmp^vec.at(i);}
  rep(i,N-1){cout<<tmp^vec.at(i)<<" ";}
  cout<<tmp^vec.at(N-1)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'const char [2]' to binary 'operator<<'
   11 |   rep(i,N-1){cout<<tmp^vec.at(i)<<" ";}
      |                        ~~~~~~~~~^~~~~
      |                              |    |
      |                              |    const char [2]
      |                              __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}
a.cc:12:24: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator<<'
   12 |   cout<<tmp^vec.at(N-1)<<endl;
      |             ~~~~~~~~~~~^~~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(void){
  int n;
  cin >> n;
  vector<int> a(n);
  int x;
  for(int i = 0;i < n;i++){
    if(i == 0){
      cin >> a[i];
      x = a[i];
    }else{
      cin >> a[i];
      x ^= a[i];
    }
  }
  for(int i = 0;i < n;i++){
    cout << a[i]^x;
  }
  cout << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: no match for 'operator^' (operand types are 'std::basic_ostream<char>' and 'int')
   19 |     cout << a[i]^x;
      |                 ^~
      |                  |
      |                  int
a.cc:19:17: note: candidate: 'operator^(int, int)' (built-in)
   19 |     cout << a[i]^x;
      |     ~~~~~~~~~~~~^~
a.cc:19:17: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/cstddef:146:3: note: candidate: 'constexpr std::byte std::operator^(byte, byte)'
  146 |   operator^(byte __l, byte __r) noexcept
      |   ^~~~~~~~
/usr/include/c++/14/cstddef:146:18: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::byte'
  146 |   operator^(byte __l, byte __r) noexcept
      |             ~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:94:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator^(_Ios_Fmtflags, _Ios_Fmtflags)'
   94 |   operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:94:27: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Fmtflags'
   94 |   operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:144:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator^(_Ios_Openmode, _Ios_Openmode)'
  144 |   operator^(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:144:27: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Openmode'
  144 |   operator^(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:191:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator^(_Ios_Iostate, _Ios_Iostate)'
  191 |   operator^(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:191:26: note:   no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Iostate'
  191 |   operator^(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |             ~~~~~~~~~~~~~^~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(void){
  int n;
  cin >> n;
  vector<int> a(n);
  int xor;
  for(int i = 0;i < n;i++){
    if(i == 0){
      cin >> a[i];
      xor = a[i];
    }else{
      cin >> a[i];
      xor ^= a[i];
    }
  }
  for(int i = 0;i < n;i++){
    cout << a[i]^xor;
  }
  cout << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: expected unqualified-id before 'xor' token
    8 |   int xor;
      |       ^~~
a.cc:12:7: error: expected primary-expression before 'xor' token
   12 |       xor = a[i];
      |       ^~~
a.cc:12:11: error: expected primary-expression before '=' token
   12 |       xor = a[i];
      |           ^
a.cc:15:7: error: expected primary-expression before 'xor' token
   15 |       xor ^= a[i];
      |       ^~~
a.cc:15:11: error: expected primary-expression before '^=' token
   15 |       xor ^= a[i];
      |           ^~
a.cc:19:18: error: expected primary-expression before 'xor' token
   19 |     cout << a[i]^xor;
      |                  ^~~
a.cc:19:21: error: expected primary-expression before ';' token
   19 |     cout << a[i]^xor;
      |                     ^
Language: C++

/// 8:31 PM 21/06/20
/// Author: t_bone_289 (An Immature Programmer.... I'm still developing !!)
#include<bits/stdc++.h>

using namespace std;
#define pll pair<ll,ll>
#define fi first
#define se second
#define mp make_pair
#define pb emplace_back
#define endl '\n'
#define VARIABLE_ERROR(x) cout << #x << " = " << x << endl;
#define CONTAINER_ERROR(v) cout << "{";for (auto &x:v) { cout << x << ','; }cout << "}" << endl;
#define PI 3.14159265358979323846
#define M 1000000007
#define INF 1e15
typedef long long ll;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    ll n;
    cin >> n;
    vector<ll> v(n);
    ll x = 0;
    for (auto &y:v) {
        cin >> y;
        x ^= y;/// 8:27 PM 21/06/20
/// Author: t_bone_289 (An Immature Programmer.... I'm still developing !!)
#include<bits/stdc++.h>

        using namespace std;
#define pll pair<ll,ll>
#define fi first
#define se second
#define mp make_pair
#define pb emplace_back
#define endl '\n'
#define VARIABLE_ERROR(x) cout << #x << " = " << x << endl;
#define CONTAINER_ERROR(v) cout << "{";for (auto &x:v) { cout << x << ','; }cout << "}" << endl;
#define PI 3.14159265358979323846
#define M 1000000007
#define INF 1e15
        typedef long long ll;

        int main() {
            ios_base::sync_with_stdio(false);
            cin.tie(nullptr);
            cout.tie(nullptr);
            ll n, q;
            cin >> n;
            vector<ll> v(n);
            ll csum = 0;
            map<ll, ll> m;
            for (auto &x:v) {
                cin >> x;
                csum += x;
                m[x]++;
            }
            cin >> q;
            while (q--) {
                ll a, b;
                cin >> a >> b;
                csum -= a * m[a];
                m[b] += m[a];
                csum += b * m[a];
                m[a] = 0;
                cout << csum << endl;
            }
            return 0;
        }
    }
    for (ll i = 0; i < n; i++) {
        cout << (x ^ v[i]) << ' ';
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:17: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   47 |         int main() {
      |                 ^~
a.cc:47:17: note: remove parentheses to default-initialize a variable
   47 |         int main() {
      |                 ^~
      |                 --
a.cc:47:17: note: or replace parentheses with braces to value-initialize a variable
a.cc:47:20: error: a function-definition is not allowed here before '{' token
   47 |         int main() {
      |                    ^
Language: Java

/*package whatever //do not write package name here */

import java.io.*;
import java.util.*;


public class main{
	public static void main (String[] args) {
	    Scanner s=new Scanner(System.in);
	    int n=s.nextInt();
        int [] A = new int[n]; int xor=0;
        for(int i=0; i<n; i++ ) 
        { A[i] = s.nextInt();
         
       xor=myXOR(xor,A[i]);
        }
        for(int i=0;i<n;i++)
        {
            System.out.print(myXOR(xor,A[i])+ " ");
        }
	}
	static int myXOR(int x, int y) 
{ 
return (x & (~y)) | ((~x )& y); 
} 
  
}

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

/*package whatever //do not write package name here */

import java.io.*;
import java.util.*;


public class MAIN {
	public static void main (String[] args) {
	    Scanner s=new Scanner(System.in);
	    int n=s.nextInt();
        int [] A = new int[n]; int xor=0;
        for(int i=0; i<n; i++ ) 
        { A[i] = s.nextInt();
         
       xor=myXOR(xor,A[i]);
        }
        for(int i=0;i<n;i++)
        {
            System.out.print(myXOR(xor,A[i])+ " ");
        }
	}
	static int myXOR(int x, int y) 
{ 
return (x & (~y)) | ((~x )& y); 
} 
  
}

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

#include <bits/stdc++.h>

using namespace std;
typedef long long LL;
typedef pair<int,int> pii;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second

#ifdef OJ
#define debug(x)  do{cerr<<#x<<": "<<x<<"\n";}while(0)
#define debugv(x) do{cerr<<#x<<": ";for(auto&e: (x))cerr<<e<<" ";cerr<<"\n";}while(0)
#else
#define debug(x)
#define debugv(x)
#endif

#define all(x) (x).begin(), (x).end()
#define rsort(x) sort((x).rbegin(), (x).rend())
#define sz(x) ((int)x.size())
#define fori(i, n) for (int i = 0; i < (int)(n); ++i)
#define ford(i, n, e) for (int i = (int)(n); i >= (int)(e); --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
template<typename T> bool mmax(T &m, const T q) { if (m < q) {m = q; return true;} else return false; }
template<typename T> bool mmin(T &m, const T q) { if (m > q) {m = q; return true;} else return false; }
#define RETURN(x) do{cout << (x) << '\n'; return 0;}while(0)


int main() {
  #include <bits/stdc++.h>

using namespace std;
typedef long long LL;
typedef pair<int,int> pii;

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second

#ifdef OJ
#define debug(x)  do{cerr<<#x<<": "<<x<<"\n";}while(0)
#define debugv(x) do{cerr<<#x<<": ";for(auto&e: (x))cerr<<e<<" ";cerr<<"\n";}while(0)
#else
#define debug(x)
#define debugv(x)
#endif

#define all(x) (x).begin(), (x).end()
#define rsort(x) sort((x).rbegin(), (x).rend())
#define sz(x) ((int)x.size())
#define fori(i, n) for (int i = 0; i < (int)(n); ++i)
#define ford(i, n, e) for (int i = (int)(n); i >= (int)(e); --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
template<typename T> bool mmax(T &m, const T q) { if (m < q) {m = q; return true;} else return false; }
template<typename T> bool mmin(T &m, const T q) { if (m > q) {m = q; return true;} else return false; }
#define RETURN(x) do{cout << (x) << '\n'; return 0;}while(0)


int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  
  int n; cin >> n;
  vector<int> a(n);
  int x = 0;
  for(int i = 0; i < n; i++) {
    cin >> a[i];
    x ^= a[i];
  }
  
  for(int i = 0; i < n; i++) {
    cout << (a[i]^x) << ' ';
  }
  cout << endl;
  return 0;
}

  int n; cin >> n;
  vector<int> a(n);
  int x = 0;
  for(int i = 0; i < n; i++) {
    cin >> a[i];
    x ^= a[i];
  }
  
  for(int i = 0; i < n; i++) {
    cout << (a[i]^x) << ' ';
  }
  cout << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:59:1: error: a template declaration cannot appear at block scope
   59 | template<typename T> bool mmax(T &m, const T q) { if (m < q) {m = q; return true;} else return false; }
      | ^~~~~~~~
a.cc:64:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   64 | int main() {
      |         ^~
a.cc:64:9: note: remove parentheses to default-initialize a variable
   64 | int main() {
      |         ^~
      |         --
a.cc:64:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:64:12: error: a function-definition is not allowed here before '{' token
   64 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>

int main() {
  int n; cin >> n;
  vector<int> a(n);
  int x = 0;
  for(int i = 0; i < n; i++) {
    cin >> a[i];
    x ^= a[i];
  }
  
  for(int i = 0; i < n; i++) {
    cout << (a[i]^x) << ' ';
  }
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   int n; cin >> n;
      |          ^~~
      |          std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:3: error: 'vector' was not declared in this scope
    5 |   vector<int> a(n);
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
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:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:5:10: error: expected primary-expression before 'int'
    5 |   vector<int> a(n);
      |          ^~~
a.cc:8:12: error: 'a' was not declared in this scope
    8 |     cin >> a[i];
      |            ^
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout << (a[i]^x) << ' ';
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:14: error: 'a' was not declared in this scope
   13 |     cout << (a[i]^x) << ' ';
      |              ^
a.cc:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   cout << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |   cout << endl;
      |           ^~~~
      |           std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	int a[n+1];
	int b[n+1];
	cin>>a[1];
	sum=a[1];
	for(int i=2;i<=n;i++){
		cin>>a[i];
		sum=sum^a[i];
	}
	for(int i=1;i<=n;i++){
		cin>>b[i];
		sum=sum^b[i];
	}
	cout<<sum<<endl;
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'sum' was not declared in this scope
    9 |         sum=a[1];
      |         ^~~
Language: C++

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

signed main(){
  int n;cin>>n;
  vector<int> v(n);
  int sum=0;
  for(int i=0;i<n;i++){
    cin>>v[i];sum^=v[i];
  }
  for(int i=0;i<n;i++)cout<<sum^v[i]<<" ";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:37: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'const char [2]' to binary 'operator<<'
   11 |   for(int i=0;i<n;i++)cout<<sum^v[i]<<" ";
Language: C++

#include <bits/stdc++.h> 
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
 
using namespace std; 
using namespace __gnu_pbds;
 
typedef long long ll;
typedef double db;
typedef long double ld;
typedef string str;
 
typedef pair<int,int> pi;
typedef pair<ll, ll> pll;
typedef pair<db, db> pdb;
typedef pair<ld, ld> pld;
typedef pair<str, str> pstr;
 
typedef vector<int> vi; 
typedef vector<ll> vll; 
typedef vector<db> vdb; 
typedef vector<ld> vld;
typedef vector<str> vstr; 
typedef vector<pi> vpi;
typedef vector<pll> vpll; 
typedef vector<pdb> vpdb; 
 
#define fi first
#define se second
#define mp make_pair
#define pf push_front 
#define pb push_back
#define ins insert 
#define eb emplace_back 
#define fbo find_by_order
#define ook order_of_key
#define rsz resize
#define lb lower_bound 
#define ub upper_bound 

#define len(s) (int)s.length()
#define sz(v) (int)v.size()
#define all(v) v.begin(), v.end()
#define srt(v) sort(all(v))

#define rep(a, b, c) for(int a=b; a<c; a++) 
#define per(a, b, c) for(int a=b; a>c; a--) //do not include boundaries on the right
#define repn(a, b, c) for(int a=b; a<=c; a++) 
#define pern(a, b, c) for(int a=b; a>=c; a--) //include boundaries on the right
 
#define yes cout << "YES"<< "\n" 
#define no cout << "NO" << "\n" 
#define out(x) cout << x << "\n"
#define outs(x) cout << x << " "
#define el cout << "\n"

#define navi ios_base::sync_with_stdio(false); cin.tie(NULL)    
 
const ll mod = 1e9+7;
const double eps = 1e-9;

int main(){
	navi;
  	int a[222222], x=0;
	int n; cin >> n;
 	rep(i,0,n){cin >> a[i]; x^=a[i];}
  	rep(j,0,n){outs((x^a[i]));}
  	el;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:30: error: 'i' was not declared in this scope
   67 |         rep(j,0,n){outs((x^a[i]));}
      |                              ^
a.cc:54:25: note: in definition of macro 'outs'
   54 | #define outs(x) cout << x << " "
      |                         ^
Language: C++

#include <bits/stdc++.h> 
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
 
using namespace std; 
using namespace __gnu_pbds;
 
typedef long long ll;
typedef double db;
typedef long double ld;
typedef string str;
 
typedef pair<int,int> pi;
typedef pair<ll, ll> pll;
typedef pair<db, db> pdb;
typedef pair<ld, ld> pld;
typedef pair<str, str> pstr;
 
typedef vector<int> vi; 
typedef vector<ll> vll; 
typedef vector<db> vdb; 
typedef vector<ld> vld;
typedef vector<str> vstr; 
typedef vector<pi> vpi;
typedef vector<pll> vpll; 
typedef vector<pdb> vpdb; 
 
#define fi first
#define se second
#define mp make_pair
#define pf push_front 
#define pb push_back
#define ins insert 
#define eb emplace_back 
#define fbo find_by_order
#define ook order_of_key
#define rsz resize
#define lb lower_bound 
#define ub upper_bound 

#define len(s) (int)s.length()
#define sz(v) (int)v.size()
#define all(v) v.begin(), v.end()
#define srt(v) sort(all(v))

#define rep(a, b, c) for(int a=b; a<c; a++) 
#define per(a, b, c) for(int a=b; a>c; a--) //do not include boundaries on the right
#define repn(a, b, c) for(int a=b; a<=c; a++) 
#define pern(a, b, c) for(int a=b; a>=c; a--) //include boundaries on the right
 
#define yes cout << "YES"<< "\n" 
#define no cout << "NO" << "\n" 
#define out(x) cout << x << "\n"
#define outs(x) cout << x << " "
#define el cout << "\n"

#define navi ios_base::sync_with_stdio(false); cin.tie(NULL)    
 
const ll mod = 1e9+7;
const double eps = 1e-9;

int main(){
	navi;
  	int a[222222], x=0;
	int n; cin >> n;
 	rep(i,0,n){cin >> a[i]; x^=a[i];}
  	rep(j,0,n){outs(x^a[j]);}
  	el;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:27: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   54 | #define outs(x) cout << x << " "
      |                           ^~ ~~~
      |                              |
      |                              const char [2]
a.cc:67:20: note: in expansion of macro 'outs'
   67 |         rep(j,0,n){outs(x^a[j]);}
      |                    ^~~~
Language: C++

#include <bits/stdc++.h> 
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
 
using namespace std; 
using namespace __gnu_pbds;
 
typedef long long ll;
typedef double db;
typedef long double ld;
typedef string str;
 
typedef pair<int,int> pi;
typedef pair<ll, ll> pll;
typedef pair<db, db> pdb;
typedef pair<ld, ld> pld;
typedef pair<str, str> pstr;
 
typedef vector<int> vi; 
typedef vector<ll> vll; 
typedef vector<db> vdb; 
typedef vector<ld> vld;
typedef vector<str> vstr; 
typedef vector<pi> vpi;
typedef vector<pll> vpll; 
typedef vector<pdb> vpdb; 
 
#define fi first
#define se second
#define mp make_pair
#define pf push_front 
#define pb push_back
#define ins insert 
#define eb emplace_back 
#define fbo find_by_order
#define ook order_of_key
#define rsz resize
#define lb lower_bound 
#define ub upper_bound 

#define len(s) (int)s.length()
#define sz(v) (int)v.size()
#define all(v) v.begin(), v.end()
#define srt(v) sort(all(v))

#define rep(a, b, c) for(int a=b; a<c; a++) 
#define per(a, b, c) for(int a=b; a>c; a--) //do not include boundaries on the right
#define repn(a, b, c) for(int a=b; a<=c; a++) 
#define pern(a, b, c) for(int a=b; a>=c; a--) //include boundaries on the right
 
#define yes cout << "YES"<< "\n" 
#define no cout << "NO" << "\n" 
#define out(x) cout << x << "\n"
#define outs(x) cout << x << " "
#define el cout << "\n"

#define navi ios_base::sync_with_stdio(false); cin.tie(NULL)    
 
const ll mod = 1e9+7;
const double eps = 1e-9;

int main(){
	navi;
  	int a[222222], x=0;
	int n; cin >> n;
 	rep(i,0,n){cin >> a[i]; x^=a[i];}
  	rep(j,0,n){outs(x^a[i]);}
  	el;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:29: error: 'i' was not declared in this scope
   67 |         rep(j,0,n){outs(x^a[i]);}
      |                             ^
a.cc:54:25: note: in definition of macro 'outs'
   54 | #define outs(x) cout << x << " "
      |                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n;
  int x=0;
  int a[n];
  for(int i=0;i<n;i++)
  {
	cin >> a[i];
    x^=a[i];
  }
  for(int i=0;i<n;i++)
  {
    cout<<x^a[i]<<" "; 
  }


	return 0;
}

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

/*
    Author: Alam Khan
    AUST CSE 40th Batch

*/

#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;

typedef long long ll;
typedef pair<ll,ll> pll;
typedef vector<ll> vl;
typedef deque<ll> dl;
typedef stack<ll> stl;
typedef set<ll> sl;
typedef map<string, ll> msl;
typedef map<ll,ll> mll;
typedef tree<ll,null_type,less_equal<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
#define sf(n)     scanf("%lld",&n)
#define sff(n,m)     scanf("%lld %lld",&n,&m)
#define sfff(n,m,r)     scanf("%lld %lld %lld",&n,&m,&r)
#define sfs(n)     scanf("%s",n)
#define pf(n)     printf("%lld\n",n)
#define pff(n,m)     printf("%lld %lld\n",n,m)
#define pfff(n,m,r)     printf("%lld %lld %lld\n",n,m,r)
#define pfs(n)     printf("%s\n",n)
#define pfcs(i,n)     printf("Case %lld: %lld\n",i,n)
#define pb     push_back
#define prf     printf
#define inf     2e18
#define low     -1000000000000
#define PI        acos(-1.0)
#define rep1(i,n) for(i=1;i<n;i++)
#define rep0(i,n) for(i=0;i<n;i++)
#define rep(i,a,n) for(i=a;i<n;i++)
#define repe1(i,n) for(i=1;i<=n;i++)
#define repe0(i,n) for(i=0;i<=n;i++)
#define repe(i,a,n) for(i=a;i<=n;i++)
#define endl  "\n"
#define FAST  ios_base::sync_with_stdio(false);cin.tie(NULL);
#define fr freopen("input.txt","r",stdin)
#define fw freopen("output.txt","w",stdout)
ll a[200009];
int main()
{
    ll i,n,t,k,j,x=0,y=0,m;
    cin>>n;
    x =0;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        x = x^a[i];
    }
    for(i=0;i<n;i++)
    {
        cout<<x^a[i]<<" ";
    }
    cout<<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:60:21: error: invalid operands of types 'll' {aka 'long long int'} and 'const char [2]' to binary 'operator<<'
   60 |         cout<<x^a[i]<<" ";
      |                 ~~~~^~~~~
      |                    |  |
      |                    |  const char [2]
      |                    ll {aka long long int}
Language: C++

#include<bits/stdc++.h>
using namespace std;
template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<long long> vlong;
typedef vector<string> vstring;
#define _GLIBCXX_DEBUG
#define vpush(a,x) a.push_back(x);
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)
const int INF = 1 << 30;
const int dx[] = {1,0,-1,0,1,1,-1,-1};
const int dy[] = {0,-1,0,1,1,-1,-1,1};
#define stp(x)  setprecision(x)
int main(){
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin>>n;
  vlong a(n);
  vint count(32,0);
  rep(i,n){
      cin>>a[i];
      ll cp=a[i];
      int fg=0;
      while(cp!=0){
          count[fg]+=cp%2;
          cp/=2;
          fg++;
      }
  }

  rep(i,n){
      ll ans=0;
      ll fg=0;

      int cnt = 30;
      while(--cnt){
          int tmp=a[i]%2;
          if((tmp==0 && count[fg]%2==1) || (tmp==1 && count[fg]%2==0)){
              ans+=1 << jg;
          }
          a[i]/=2;
          fg++;
      }
      cout<<ans<<' ';
  }
  return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:25: error: 'jg' was not declared in this scope; did you mean 'fg'?
   45 |               ans+=1 << jg;
      |                         ^~
      |                         fg
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
  ll n;
  cin>>n;
  ll v[n];
  ll s=-1;
  for(ll i=0;i<n;i++){
    cin>>v[i];
    if(s==-1)
      s=v[i];
    else
      s=s^v[i];
  }
  ll a[n];
  for(ll i=0;i<n;i++)
    cout<<s^v[i]<<" ";
  cout<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: invalid operands of types 'long long int' and 'const char [2]' to binary 'operator<<'
   18 |     cout<<s^v[i]<<" ";
      |             ~~~~^~~~~
      |                |  |
      |                |  const char [2]
      |                long long int
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
  	cin>>n;
    int x=0;
    for(int i=0;i<n;i++)
    {
       cin>>a[i];
       x=x^a[i];
    }
    for(int i=0;i<n;i++)
    {
      int ans=0;
      ans=a[i]^x;
      cout<<ans<<" ";
    }
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'a' was not declared in this scope
   10 |        cin>>a[i];
      |             ^
a.cc:16:11: error: 'a' was not declared in this scope
   16 |       ans=a[i]^x;
      |           ^
Language: C++


#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <string>
#include <map>
#include <iostream>
#include <sstream>
#include <stack>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <climits>
#include <limits>
#include <queue>
#include <utility>

using namespace std;



#define ll long long

	int main() {

		int n;
		cin >> n;

		vector<int> arr(n);

		for (int i = 0; i < n; i++) {
			int val;
			cin >> val;
			arr[i] = val;
		}

		for (int i = 0; i < n; i++) {
			
			int res = 0;
			for (int j = 0; j < n; j++) {
				if (j == i) continue;
				res = res ^ arr[i];
			}
			cout << res << " ";

		}
		
		cout << endl

	}

	



Compiler output:
a.cc: In function 'int main()':
a.cc:48:29: error: expected ';' before '}' token
   48 |                 cout << endl
      |                             ^
      |                             ;
   49 | 
   50 |         }
      |         ~
Language: C

#include<stdio.h>

void ans(int *a, int n);

int main() {
    int n; scanf("%d", &n);
    int tbl[30][n];
    for (int i=0; i<30; i++) {
        for (int j=0; j<n; j++) {
            tbl[i][j] = 0;
        }
    }
    int a;
    for (int i=0; i<n; i++) {
        scanf("%d", &a);
        int digit;
        int cnt = 0;
        while (a != 0) {
            tbl[cnt][i] = a % 2;
            a /= 2;
            cnt += 1;
        }
    }
    for (int i=0; i<30; i++) {
        ans(tbl[i], n);
    }
    for (int i=0; i<n; i++) {
        int sum = 0;
        for (int j=0; j<30; j++) {
            sum += pow(2, tbl[j,i]);
        }
        printf("%d\n", sum);
    }
}

void ans(int *a, int n) {
    int b[n]; b[0] = 0;
    int temp = 0;
    for (int i=0; i<n-1, i++) {
        if (a[i] != a[i+1]) {
            b[i+1] = (!b[i]);
        } else {
            b[i+1] = b[i];
        }
    }
    int sum = 0;
    for (int i=1; i<n; i++) {
        sum += b[i]
    }
    if (a[0] == (sum % 2)) {
        for (int i=0; i<n; i++) {
            a[i] = b[i];
        }
    } else {
        for (int i=0; i<n; i++) {
            a[i] = (!b[i]);
        }
    }
}

Compiler output:
main.c: In function 'main':
main.c:30:20: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
   30 |             sum += pow(2, tbl[j,i]);
      |                    ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'pow'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:30:20: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
   30 |             sum += pow(2, tbl[j,i]);
      |                    ^~~
main.c:30:20: note: include '<math.h>' or provide a declaration of 'pow'
main.c:30:30: error: incompatible type for argument 2 of 'pow'
   30 |             sum += pow(2, tbl[j,i]);
      |                           ~~~^~~~~
      |                              |
      |                              int *
main.c:30:30: note: expected 'double' but argument is of type 'int *'
main.c: In function 'ans':
main.c:39:29: error: expected ';' before ')' token
   39 |     for (int i=0; i<n-1, i++) {
      |                             ^
      |                             ;
main.c:48:20: error: expected ';' before '}' token
   48 |         sum += b[i]
      |                    ^
      |                    ;
   49 |     }
      |     ~
Language: C++

#include <stdio.h>

int main(void)
{
	int i,a,N,b[200000][100],s[100],z,memo[100],max=0,answer[100],j;
	long long total;
	for(i=0;i<100;i++)memo[i]=0;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d",&a);
		for(j=0;a>0;j++){
			s[j]=a%2;
			a/=2;
		}
		if(max<j)max=j;
		for(z=0;j>0;j--){
			b[i][z]=s[j-1];
			memo[z]+=s[j-1];
			z++;
		}
	}
	for(i=0;i<N;i++){
		total=0;
		for(j=0;j<max;j++){
			if(memo[j]%2==0){
				answer[j]=b[i][j];
			}else{
				if(b[i][j]==0)answer[j]=1;
				else answer[j]=0;
			}
		}
		for(j=0;j<max;j++){
			for(z=1;z<=j)answer[j]=answer[j]*2;
			total+=answer[j];
		}
		printf("%lld\n",total);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:37: error: expected ';' before ')' token
   33 |                         for(z=1;z<=j)answer[j]=answer[j]*2;
      |                                     ^
      |                                     ;
Language: C

#include<stdio.h>

void ans(*a, n);

int main() {
    int n; scanf("%d", &n);
    int tbl[30][n];
    for (int i=0; i<30; i++) {
        for (int j=0; j<n; j++) {
            tbl[i][j] = 0;
        }
    }
    int a;
    for (int i=0; i<n; i++) {
        scanf("%d", &a);
        int digit;
        int cnt = 0;
        while (a != 0) {
            tbl[cnt][i] = a % 2;
            a /= 2;
            cnt += 1;
        }
    }
    for (int i=0; i<30; i++) {
        ans(tbl[i], n);
    }
    for (int i=0; i<n; i++) {
        int sum = 0;
        for (int j=0; j<30; j++) {
            sum += pow(2, tbl[j,i]);
        }
        printf("%d\n", sum);
    }
}

void ans(*a, n) {
    int b[n]; b[0] = 0;
    int temp = 0;
    for (int i=0; i<n-1, i++) {
        if (a[i] != a[i+1]) {
            b[i+1] = (!b[i]);
        } else {
            b[i+1] = b[i];
        }
    }
    int sum = 0;
    for (int i=1; i<n; i++) {
        sum += b[i]
    }
    if (a[0] == (sum % 2)) {
        for (int i=0; i<n; i++) {
            a[i] = b[i];
        }
    } else {
        for (int i=0; i<n; i++) {
            a[i] = (!b[i]);
        }
    }
}

Compiler output:
main.c:3:10: error: expected declaration specifiers or '...' before '*' token
    3 | void ans(*a, n);
      |          ^
main.c:3:14: error: unknown type name 'n'
    3 | void ans(*a, n);
      |              ^
main.c: In function 'main':
main.c:25:9: error: implicit declaration of function 'ans' [-Wimplicit-function-declaration]
   25 |         ans(tbl[i], n);
      |         ^~~
main.c:30:20: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
   30 |             sum += pow(2, tbl[j,i]);
      |                    ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'pow'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:30:20: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
   30 |             sum += pow(2, tbl[j,i]);
      |                    ^~~
main.c:30:20: note: include '<math.h>' or provide a declaration of 'pow'
main.c:30:30: error: incompatible type for argument 2 of 'pow'
   30 |             sum += pow(2, tbl[j,i]);
      |                           ~~~^~~~~
      |                              |
      |                              int *
main.c:30:30: note: expected 'double' but argument is of type 'int *'
main.c: At top level:
main.c:36:10: error: expected declaration specifiers or '...' before '*' token
   36 | void ans(*a, n) {
      |          ^
main.c:36:14: error: unknown type name 'n'
   36 | void ans(*a, n) {
      |              ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

int inverse(int n){
   int i=1;
   for (int j=1; j<(int) log2 (n);j++){
      i= i*2;
   }
   return i*2;
}
int myXOR(int x, int y) 
{ 
   return (x | y) & (~x | ~y); 
}   

int main(){
  ios::sync_with_stdio(false);    
  int n;
  cin >> n;
  int A[n];
  int total=0;
  for (int i=0; i<n; i++){
    cin >> A[i];
    total = myXOR( total,A[i]);
  }
  for (int j=0;j<n;j++){
    cout << myXOR(total,inverse(A[i])) << " ";
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:35: error: 'i' was not declared in this scope
   29 |     cout << myXOR(total,inverse(A[i])) << " ";
      |                                   ^
Language: C++

																//  SMOKE SHISHA PLAY FIFA  // 
#include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef long double ld;

#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
#define pll pair<ll,ll>
#define MP make_pair
#define ff first
#define ss second
#define PB push_back
#define mod 1000000007
#define lp(i,start,end) for(ll i=start;i<=end;i++) 
#define deb1(a) cout<<#a<<" = "<<(a)<<endl;
#define deb2(a,b) cout<<#a<<" = "<<(a)<<", "<<#b<<" = "<<(b)<<endl;
#define deb3(a,b,c) cout<<#a<<" = "<<(a)<<", "<<#b<<" = "<<(b)<<", "<<#c<<" = "<<(c)<<endl;


ll modu(ll a, ll b)
{
	ll ans =1;
	while(b>0)
	{
		if(b&1)
		ans = (ans*a)%mod;
		b/=2;
		a = (a*a)%mod;
	}
	return ans;
}

int main()
{
	fastio
	ll n;
	ll a[n];
	ll al;
	cin>>a[0]>>a[i];
	al=a[0]^a[1];
	lp(i,2,n-1){
		cin>>a[i];
		al=al^a[i];
	}
	for(ll i=0; i<n; i++)
		cout<<al^a[i]<<" "
	cout<<endl;

	return 0;	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:22: error: 'i' was not declared in this scope
   40 |         cin>>a[0]>>a[i];
      |                      ^
a.cc:47:30: error: invalid operands of types 'll' {aka 'long long int'} and 'const char [2]' to binary 'operator<<'
   47 |                 cout<<al^a[i]<<" "
      |                          ~~~~^~~~~
      |                             |  |
      |                             |  const char [2]
      |                             ll {aka long long int}
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

int inverse(n){
   int i=1;
   for (int j=1; j<(int) log2 (n);j++){
      i= i*2;
   }
   return i*2;
}
int myXOR(int x, int y) 
{ 
   return (x | y) & (~x | ~y); 
}   

int main(){
  ios::sync_with_stdio(false);    
  int n;
  cin >> n;
  int A[n];
  int total=0;
  for (int i=0; i<n; i++){
    cin >> A[i];
    total = myXOR( total,A[i]);
  }
  for (int j=0;j<n;j++){
    cout << myXOR(total,inverse(A[i])) << " ";
  }  
}

Compiler output:
a.cc:6:13: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 | int inverse(n){
      |             ^
      |             yn
a.cc: In function 'int main()':
a.cc:29:35: error: 'i' was not declared in this scope
   29 |     cout << myXOR(total,inverse(A[i])) << " ";
      |                                   ^
a.cc:29:37: error: 'inverse' cannot be used as a function
   29 |     cout << myXOR(total,inverse(A[i])) << " ";
      |                                     ^
Language: C++

#include <bits/stdc++.h>
#define long long int
using namespace std;
const int N = 2e5 + 10;
int a[N], n, ans = -1;
signed main(void){
	cin >> n;
	for (int i = 1; i <= n; i++){
		cin >> a[i];
		if (ans == -1)
		ans = a[i];
	}
	else 
		ans ^= a[i];
	for (int i = 1; i <= n; i++)
		cout << (ans ^ a[i]) << (i == n ? '\n' : '  ');
	return 0;
}


Compiler output:
a.cc:16:58: warning: multi-character character constant [-Wmultichar]
   16 |                 cout << (ans ^ a[i]) << (i == n ? '\n' : '  ');
      |                                                          ^~~~
a.cc: In function 'int main()':
a.cc:13:9: error: 'else' without a previous 'if'
   13 |         else
      |         ^~~~
a.cc:14:26: error: 'i' was not declared in this scope
   14 |                 ans ^= a[i];
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) (x).begin(),(x).end()
using ll = long long;
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; }



int main() {
	
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	
	int n; cin >> n;
	
	vector<ll> a(n), ans(n,0); rep(i,n) cin >> a[i];
	
	int sum = 0;
	
	rep(i,n){
		sum = sum ^ a[i];
	}
	
	rep(i,n) cout << sum ^ a[i] << " ";
	
	cout << endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:37: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and 'const char [2]' to binary 'operator<<'
   27 |         rep(i,n) cout << sum ^ a[i] << " ";
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    int n, x = 0;
  	cin >> n;
  	int a[n];
  	for (int i = 0; i < n; i++) {
    	cin >> a[i];
      	x ^= a[i];
    }
  	for (int i = 0; i < n; i++) {
    	cout << x ^ a[i] << " ";
    }
  	cout << endl;
  	return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  vector<int>ans(n);
  int x=0;
  for(int i=0;i<n;i++)
  {
    int temp;
    cin>>temp;
    ans[i]=temp;
    x=x^temp;
  }
  for(int i=0;i<n;i++)
  {
    cout<<x^ans[i]<<" ";
  }
  

  }

Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'const char [2]' to binary 'operator<<'
   18 |     cout<<x^ans[i]<<" ";