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

#include<iostream>
#include<atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long li;
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
template<class T> void print(const T& t){ cout << t << "\n"; }
template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }

int main(){
  int n,q; cin >>n >>q;
  
  dsu g(n);
  rep(_,q){
    int t,u,v; cin >>t >>u >>v;
    if(t==0) g.merge(u,v);
    else print(g.same(u,v));
  }
  
}


Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include "bits/stdc++.h"
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define ll long long
ll INF = (1LL << 60);

signed main() {
	
	return 0;
}


Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template<class T> using vc = vector<T>;
template<class T> using vvc = vector<vector<T>>;

#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n)-1; i >= 0; i--)
#define repe(i, l, r) for (ll i = (l); i < (r); i++)
#define reper(i, l, r) for (ll i = (r)-1; i >= (l); i--)
#define repa(i,n) for (auto& i: n)

template<class T> inline bool chmax(T &a, const T &b) {if (a<b) { a=b; return 1;} return 0;}
template<class T> inline bool chmin(T &a, const T &b) {if (b<a) { a=b; return 1;} return 0;}
struct init{init(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}}init_;

#ifdef DEBUG
template <class T, class N> void verr(const T& a, const N& n) { rep(i, n) cerr << a[i] << " "; cerr << "\n" << flush; }
ll dbgt = 1; void err() { cerr << "passed " << dbgt++ << "\n" << flush; }
template<class H, class... T> void err(H&& h,T&&... t){ cerr<< h << (sizeof...(t)?" ":"\n") << flush; if(sizeof...(t)>0) err(forward<T>(t)...); }
#endif

const ll INF = 4e18;
const ld EPS = 1e-11;
const ld PI = acos(-1.0L);
const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;
//--------------------------------------------------------------------------------//

int main() {
    ll N, Q;
    cin >> N >> Q;
    dsu uf(N);

    rep(_, Q){
        ll t, u, v;
        cin >> t >> u >> v;

        if(t == 0){
            uf.merge(u, v);
        }else{
            cout << (uf.same(u, v) ? 1 : 0) << '\n';
        }
    }
}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int n, q;
  cin >> n >> q;
  dsu d(n);
  for (int i = 0; i < q; i++) {
    int t, u, v;
    cin >> t >> u >> v;
    if (t == 0) {
      d.merge(u, v);
    } else {
      cout << (d.leader(u) == d.leader(v)) << endl;
    }
  }
}


Compiler output:
a.cc:2:10: fatal error: atcoder/dsu: No such file or directory
    2 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int n, q;
  cin >> n >> q;
  dsu tr(n);
  for (int i = 0; i < q; i++) {
    int t, u, v;
    cin >> t >> u >> v;
    if (t == 0) {
      tr.merge(u, v);
    } else {
      cout << (tr.leader(u) == tr.leader(v)) << endl;
    }
  }
}


Compiler output:
a.cc:2:10: fatal error: atcoder/dsu: No such file or directory
    2 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

class unionfind {
  vector<int> par;
  
public:
  unionfind(int n) {
    for (int i = 0; i < n; i++) {
      par.push_back(i);
    }
  }
  
  int find(int n) {
    if (par.at(n) == n) return n;
    return par.at(n) = find(par.at(n));
  }
  
  void merge(int m, int n) {
    m = find(m);
    n = find(n);
    par.at(m) = n;
  }
};

int main() {
  int n, q;
  cin >> n >> q;
  unionfind t(n);
  for (int i = 0; i < q; i++) {
    int t, u, v;
    cin >> t >> u >> v;
    if (t == 0) {
      t.merge(u, v);
    } else {
      cout << (t.find(u) == t.find(v)) << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:9: error: request for member 'merge' in 't', which is of non-class type 'int'
   34 |       t.merge(u, v);
      |         ^~~~~
a.cc:36:18: error: request for member 'find' in 't', which is of non-class type 'int'
   36 |       cout << (t.find(u) == t.find(v)) << endl;
      |                  ^~~~
a.cc:36:31: error: request for member 'find' in 't', which is of non-class type 'int'
   36 |       cout << (t.find(u) == t.find(v)) << endl;
      |                               ^~~~
Language: Java

import java.util.*;
public class Solution {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int t = input.nextInt();
        for(int i = 0; i < t; i++) {
            int a = input.nextInt();
            int b = input.nextInt();
            if(Math.abs(a - b) % 10 == 0) {
                System.out.println(Math.abs(a - b)/10);
            } else System.out.println(Math.abs(a - b)/10 + 1);
        }
    }
}


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

import java.util.*;
public class A {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int t = input.nextInt();
        for(int i = 0; i < t; i++) {
            int a = input.nextInt();
            int b = input.nextInt();
            if(Math.abs(a - b) % 10 == 0) {
                System.out.println(Math.abs(a - b)/10);
            } else System.out.println(Math.abs(a - b)/10 + 1);
        }
    }
}


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

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

#ifdef LOCAL
#define DEBUG(...) debug(#__VA_ARGS__, __VA_ARGS__);
#else
#define DEBUG(...) 6;
#endif

template<typename T, typename S> ostream& operator << (ostream &os, const pair<T, S> &p) {return os << "(" << p.first << ", " << p.second << ")";}
template<typename C, typename T = decay<decltype(*begin(declval<C>()))>, typename enable_if<!is_same<C, string>::value>::type* = nullptr>
ostream& operator << (ostream &os, const C &c) {bool f = true; os << "["; for (const auto &x : c) {if (!f) os << ", "; f = false; os << x;} return os << "]";}
template<typename T> void debug(string s, T x) {cerr << s << " = " << x << "\n";}
template<typename T, typename... Args> void debug(string s, T x, Args... args) {cerr << s.substr(0, s.find(',')) << " = " << x << " | "; debug(s.substr(s.find(',') + 2), args...);}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    int n, q;
    cin >> n >> q;
    dsu ds(n);
    for (int i=0; i<q; i++) {
        int t, u, v;
        cin >> t >> u >> v;
        if (t == 0)
            ds.merge(u, v);
        else
            cout << ds.same(u, v) << "\n";
    }

    return 0;
}


Compiler output:
a.cc:2:10: fatal error: atcoder/dsu: No such file or directory
    2 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <iomanip>
#include <climits>
#include <functional>
#include <cassert>
using namespace std;
using namespace atcoder;
typedef long long ll;
typedef pair<int,int> PII;
typedef pair<ll,ll> PLL;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<string> VS;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<PII> VPI;
typedef vector<PLL> VPL;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define pf push_front
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define ub upper_bound
#define lb lower_bound

#include <atcoder/convolution>
#include <atcoder/dsu>
#include <atcoder/fenwicktree>
#include <atcoder/lazysegtree>
#include <atcoder/math>
#include <atcoder/maxflow>
#include <atcoder/mincostflow>
#include <atcoder/modint>
#include <atcoder/scc>
#include <atcoder/segtree>
#include <atcoder/string>
#include <atcoder/twosat>*/

int main(){
  int N,Q;
  cin>>N>>Q;
  VI T(Q),U(Q),V(Q);
  rep(i,Q) cin>>T[i]>>U[i]>>V[i];
  dsu D(N);
  rep(i,Q){
    if(T[i]){
      if(D.same(U[i],V[i])) cout<<1<<endl;
      else cout<<0<<endl;
    }else D.merge(U[i],V[i]);
  }
}



Compiler output:
a.cc:36:10: fatal error: atcoder/convolution: No such file or directory
   36 | #include <atcoder/convolution>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <iomanip>
#include <climits>
#include <functional>
#include <cassert>
using namespace std;
using namespace atcoder;
typedef long long ll;
typedef pair<int,int> PII;
typedef pair<ll,ll> PLL;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<string> VS;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<PII> VPI;
typedef vector<PLL> VPL;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define pf push_front
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define ub upper_bound
#define lb lower_bound
#include <atcoder/convolution>
#include <atcoder/dsu>
#include <atcoder/fenwicktree>
#include <atcoder/lazysegtree>
#include <atcoder/math>
#include <atcoder/maxflow>
#include <atcoder/mincostflow>
#include <atcoder/modint>
#include <atcoder/scc>
#include <atcoder/segtree>
#include <atcoder/string>
#include <atcoder/twosat>*/

int main(){
  int N,Q;
  cin>>N>>Q;
  VI T(Q),U(Q),V(Q);
  rep(i,Q) cin>>T[i]>>U[i]>>V[i];
  dsu D(N);
  rep(i,Q){
    if(T[i]){
      if(D.same(U[i],V[i])) cout<<1<<endl;
      else cout<<0<<endl;
    }else D.merge(U[i],V[i]);
  }
}


Compiler output:
a.cc:35:10: fatal error: atcoder/convolution: No such file or directory
   35 | #include <atcoder/convolution>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <iomanip>
#include <climits>
#include <functional>
#include <cassert>
using namespace std;
using namespace atcoder;
typedef long long ll;
typedef pair<int,int> PII;
typedef pair<ll,ll> PLL;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<string> VS;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<PII> VPI;
typedef vector<PLL> VPL;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define pf push_front
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define ub upper_bound
#define lb lower_bound
#include <atcoder/all>

int main(){
  int N,Q;
  cin>>N>>Q;
  VI T(Q),U(Q),V(Q);
  rep(i,Q) cin>>T[i]>>U[i]>>V[i];
  dsu D(N);
  rep(i,Q){
    if(T[i]){
      if(D.same(U[i],V[i])) cout<<1<<endl;
      else cout<<0<<endl;
    }else D.merge(U[i],V[i]);
  }
}


Compiler output:
a.cc:35:10: fatal error: atcoder/all: No such file or directory
   35 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

#include <atcoder/all>
#include <bits/stdc++.h>

using namespace std;
using namespace atcoder;

int main(){
  int n,q;
  cin>>n>>q;
  
  dsu d(n);
  rep(i,q){
    int c,u,v;
    cin>>c>>u>>v;
    if(c==0) d.merge(u,v);
    if(c==1) cout<<d.same(u,v)<<endl;
  }
  
  return 0;
}

Compiler output:
a.cc:5:10: fatal error: atcoder/all: No such file or directory
    5 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
#define all(n) begin(n), end(n)
const long long INF = numeric_limits<long long>::max();
typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef unsigned long long ull;
template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
vector<T> make_v(size_t a) { return vector<T>(a); }

template <typename T, typename... Ts>
auto make_v(size_t a, Ts... ts)
{
    return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type
fill_v(T &t, const V &v) { t = v; }

template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type
fill_v(T &t, const V &v)
{
    for (auto &e : t)
        fill_v(e, v);
}
struct UnionFind
{
    vector<int> data;

    UnionFind(int sz)
    {
        data.assign(sz, -1);
    }

    bool unite(int x, int y)
    {
        x = find(x), y = find(y);
        if (x == y)
            return (false);
        if (data[x] > data[y])
            swap(x, y);
        data[x] += data[y];
        data[y] = x;
        return (true);
    }

    int find(int k)
    {
        if (data[k] < 0)
            return (k);
        return (data[k] = find(data[k]));
    }

    int size(int k)
    {
        return (-data[find(k)]);
    }
    bool same(int x, int y)
    {
        return find(x) == find(y);
    }
};

int main()
{
    ios::sync_with_stdio(false);
	cin.tie(0);
    int n,q;
    cin>>n>>q;
    UnionFind uf(n);
    for (size_t i = 0; i < q; i++)
    {
        int t,u,v;
        cin>>t>>u>>v;
        if(t)
        {
            cout<<uf.same(u,v)<<"\n";
        }
        else
        {
            uf.unite(u,v);
        }
        
    }
    
    return 0;
}


Compiler output:
a.cc:1:10: fatal error: atcoder/all: No such file or directory
    1 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <atcoder/dsu>
using namespace std;
using namespace atcoder;

int main() {
	// 0-ind
	int N, Q; cin >> N >> Q;
	dsu d(N);
	while(Q--) {
		int t, u, v; cin >> t >> u >> v;
		if (t == 0) {
			d.merge(u, v);
		} else {
			cout << d.same(u, v) << endl;
		}
	}
}

Compiler output:
a.cc:2:10: fatal error: atcoder/dsu: No such file or directory
    2 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
	// 0-ind
	int N, Q; cin >> N >> Q;
	dsu d(N);
	while(Q--) {
		int t, u, v; cin >> t >> u >> v;
		if (t == 0) {
			d.merge(u, v);
		} else {
			cout << d.same(u, v) << endl;
		}
	}
}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <atcoder/dsu>
#include <bits/stdc++.h>

using namespace std;
using namespace atcoder;

int main() {
	// 0-ind
	int N, Q; cin >> N >> Q;
	dsu d(N);
	while(Q--) {
		int t, u, v; cin >> t >> u >> v;
		if (t == 0) {
			d.merge(u, v);
		} else {
			cout << d.same(u, v) << endl;
		}
	}
}

Compiler output:
a.cc:1:10: fatal error: atcoder/dsu: No such file or directory
    1 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
	// 0-ind
	int N, Q; cin >> N >> Q;
	dsu d(N);
	while(Q--) {
		int t, u, v; cin >> t >> u >> v;
		if (t == 0) {
			d.merge(u, v);
		} else {
			cout << d.same(u, v) << endl;
		}
	}
}

Compiler output:
a.cc:2:10: fatal error: atcoder/dsu: No such file or directory
    2 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long int ll;
typedef pair<ll,ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
const ll MOD = 1000000007;
const ll INF = 1e18;
#define REP(i,n) for(int i=0;i<n;i++)
#define ALL(v) v.begin(),v.end()

int main(){
	int n, q; cin >> n >> q;
	dsu d(n);
	while(q--){
		int t, u, v;
		cin >> t >> u >> v;
		if(t==0)
			d.merge(u,v);
		else
			cout << d.same(u,v) << endl;
	}
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main()
{
  int n,q;
  cin>>n>>q ;
  dsu D(n);
  for(int i=0 ; i<q ; ++i)
  {
    int t,u,v ;
    cin>>t>>u>>v ;
    if(t==0)
      D.merge(u,v);
    else
      cout<<D.same(u,v)<<"\n";
  }
  
  return 0;
}


Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <atcoder/all>
using namespace std;

int main()
{
  int n,q;
  cin>>n>>q ;
  dsu D(n);
  for(int i=0 ; i<q ; ++i)
  {
    int t,u,v ;
    cin>>t>>u>>v ;
    if(t==0)
      D.merge(u,v);
    else
      cout<<D.same(u,v)<<"\n";
  }
  
  return 0;
}


Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <atcoder/dsu>
using namespace std;
using namespace atcoder;

int n, q;
int t, u, v;

int main() {
	cin >> n >> q;
	dsu uf(n);
	
	for (int i = 0; i < q; i++) {
		cin >> t >> u >> v;
		if (t == 0) {
			uf.merge(u, v);
		}
		else {
			if (uf.same(u, v)) {
				cout << 1 << endl;
			}
			else {
				cout << 0 << endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: atcoder/dsu: No such file or directory
    2 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main()
{
  int n,q;
  cin>>n>>q ;
  dsu D(n);
  for(int i=0 ; i<q ; ++i)
  {
    int t,u,v ;
    cin>>t>>u>>v ;
    if(t==0)
      D.merge(u,v);
    else
      cout<<D.same(u,v)<<"\n";
  }
  
  return 0;
}

Compiler output:
a.cc:2:9: fatal error: atcoder/dsu: No such file or directory
    2 | #include<atcoder/dsu>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#pragma region template
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vld = vector<ld>;
using vvld = vector<vld>;
using vvvld = vector<vvld>;
using vs = vector<string>;
using pll = pair<ll, ll>;
using vp = vector<pll>;
template <typename T>
using pqrev = priority_queue<T, vector<T>, greater<T>>;
#define rep(i, n) for (ll i = 0, i##_end = (n); i < i##_end; i++)
#define repb(i, n) for (ll i = (n)-1; i >= 0; i--)
#define repr(i, a, b) for (ll i = (a), i##_end = (b); i < i##_end; i++)
#define reprb(i, a, b) for (ll i = (b)-1, i##_end = (a); i >= i##_end; i--)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((ll)(x).size())
//*
constexpr ll MOD = 1e9 + 7;
/*/
constexpr ll MOD = 998244353;
//*/
constexpr ll INF = 1e+18;
constexpr ld EPS = 1e-12L;
constexpr ld PI = 3.14159265358979323846L;
constexpr ll GCD(ll a, ll b) { return b ? GCD(b, a % b) : a; }
constexpr ll LCM(ll a, ll b) { return a / GCD(a, b) * b; }
template <typename S, typename T>
constexpr bool chmax(S &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename S, typename T>
constexpr bool chmin(S &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
#ifdef OJ_LOCAL
#include "dump.hpp"
#else
#define dump(...) ((void)0)
#endif
template <typename T>
bool print_(const T &a) {
  cout << a;
  return true;
}
template <typename T>
bool print_(const vector<T> &vec) {
  for (auto &a : vec) {
    cout << a;
    if (&a != &vec.back()) {
      cout << " ";
    }
  }
  return false;
}
template <typename T>
bool print_(const vector<vector<T>> &vv) {
  for (auto &v : vv) {
    for (auto &a : v) {
      cout << a;
      if (&a != &v.back()) {
        cout << " ";
      }
    }
    if (&v != &vv.back()) {
      cout << "\n";
    }
  }
  return false;
}
void print() { cout << "\n"; }
template <typename Head, typename... Tail>
void print(Head &&head, Tail &&... tail) {
  bool f = print_(head);
  if (sizeof...(tail) != 0) {
    cout << (f ? " " : "\n");
  }
  print(forward<Tail>(tail)...);
}
#pragma endregion

void Pr(bool f){
  cout << (f ? "Yes" : "No") << "\n";
  exit(0);
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  int N, Q;
  cin >> N >> Q;
  dsu d(N);
  while(Q--){
    int t, u, v;
    cin >> t >> u >> v;
    if(t == 0){
      d.merge(u, v);
    }else{
      print(d.same(u, v));
    }
  }
}


Compiler output:
a.cc:3:10: fatal error: atcoder/all: No such file or directory
    3 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/dsu>
using namespace std;
using namespace atcoder;
#ifdef __DEBUG__
    void debug_out() { cerr << endl; } 
    template <typename Head, typename... Tail>
    void debug_out(Head H, Tail... T) {cerr << " " << H; debug_out(T...);}
    #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
    #define debug(...) 
#endif

using ll = long long int;
using ull = unsigned long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

int dx[]={1, 0, -1, 0, 1,-1, 1,-1};
int dy[]={0, 1, 0, -1, 1, 1,-1,-1};
const int INT_INF = (int)(2e9);
const ll  LL_INF = (ll)(2e18);

inline void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); };
template<typename T, typename S> inline ostream& operator<<(ostream& os, const pair<T, S> p) { cout << "[" << p.first << ";" << p.second << "]"; return os; }
template<typename T, typename S> inline ostream& operator<<(ostream& os, const map<T, S> p) { for (auto el : p) cout << "[" << el.first << ";" << el.second << "]"; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const vector<T>& v) { for (auto el : v) cout << el << " "; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const deque<T>& v) { for (auto el : v) cout << el << " "; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const set<T>& v) { for (auto el : v) cout << el << " "; return os; }
template<typename T> inline vector<T> fetch_vec(int sz) { vector<T> ret(sz); for (auto& elem : ret) cin >> elem; return ret; }

int N,Q;
inline void input(){
    fast_io();
    cin >> N >> Q;
}

inline int solve(){
    dsu D(N);
    for (int i = 0; i < Q; i++)
    {
        int t,u,v;
        cin >> t >> u >> v;
        if(t==0){
            D.merge(u,v);
        }
        else{
            cout << D.same(u,v) << endl;
        }
    }
    return 0;
}   

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


Compiler output:
a.cc:2:10: fatal error: atcoder/dsu: No such file or directory
    2 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
#include<bitset>
#include<tuple>
#include<unordered_set>
#include<unordered_map>
#include<random>
#include<array>
#include<cassert>
#include <atcoder/dsu>
using namespace std;
#define INF ((1<<30)-1)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()




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

	int n, q;
	cin >> n >> q;
	atcoder::dsu d(n);

	rep(i, q) {
		int t, u, v;
		cin >> t >> u >> v;

		if (t == 0) {
			d.merge(u, v);
		}
		else {
			cout << (d.same(u, v) ? 1 : 0) << endl;
		}
	}


	return 0;
}


Compiler output:
a.cc:24:10: fatal error: atcoder/dsu: No such file or directory
   24 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<atcoder/all>
int main(){int n,q,t,u,v;std::cin>>n>>q;for(atcoder::dsu s(n);q--;)std::cin>>t>>u>>v;t?std::cout<<s.same(u,v)<<std::endl:s.merge(u,v);}

Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<atcoder/all>
int main(){int n,q,t,u,v;std::cin>>n>>q;for(atcoder::dsu s(n);q--;){std::cin>>t>>u>>v;t?std::cout<<s.same(u,v)<<std::endl:s.merge(u,v);}}

Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<atcoder/all>
int main(){int n,q,t,u,v,i;std::cin>>n>>q;atcoder::dsu s(n);for(i=0;i<q;i++){std::cin>>t>>u>>v;t?std::cout<<s.same(u,v)<<std::endl:s.merge(u,v);}}

Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<atcoder/all>
int main(n){int q,t,u,v,i;std::cin>>n>>q;atcoder::dsu s(n);for(i=0;i<q;i++){std::cin>>t>>u>>v;if(t)std::cout<<s.same(u,v)<<std::endl;else s.merge(u,v);}}

Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<atcoder/all>
int main(n){int q,t,u,v,i;std::cin>>n>>q;atcoder::dsu s(n);for(i=0;i<q;i++){std::cin>>t>>u>>v;if(t)std::cout<<s.same(u,v)<<endl;else s.merge(u,v);}}

Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<atcoder/all>
int main(){int n,q,t,u,v,i;std::cin>>n>>q;atcoder::dsu uf(n);for(i=0;i<q;i++){std::cin>>t>>u>>v;if(t)std::cout<<uf.same(u,v)<<endl;else uf.merge(u,v);}}

Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
using P = pair<int,int>;

int main(void){
    int n, q;
    cin >> n >> q;
    dsu tree(n);
    for(int i = 0; i < q; i++){
        int t, u, v;
        cin >> t >> u >> v;
        if(t == 0){
            tree.merge(u, v);
        }
        else{
            if(tree.same(u, v)){
                cout << 1 << endl;
            }
            else{
                cout << 0 << endl;
            }
        }
    }
    return 0;
}

Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<list>
#include<iomanip>
#include<cmath>
#include<cstring>
#include<functional>
#include<cstdio>
#include<cstdlib>
#include<numeric>
#include<atcoder/dsu>
using namespace std;

#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
//#define MOD 1000000007
#define MOD 998244353
#define LINF (long long)4e18
#define jck 3.141592

const double EPS = 1e-10;

using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;


int main(){
    int n,q; cin >> n >> q;
    dsu d(n);
    rep(i,q){
        int t; cin >> t;
        int u,v; cin >> u >> v;
        if(t == 0){
            d.merge(u,v);
        }
        else{
            if(d.same(u,v)) cout << 1 << endl;
            else cout << 0 << endl;
        }
    }
}



Compiler output:
a.cc:19:9: fatal error: atcoder/dsu: No such file or directory
   19 | #include<atcoder/dsu>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <string.h>
#include <cstdio>
#include <tuple>
#include <numeric>
#include <functional>
#include <atcoder/all>
using namespace std; using namespace atcoder;
using ll = long long; using ld = long double;  using pll = pair<ll, ll>;
using vl = vector<ll>; using vll = vector<vl>; using vlll = vector<vll>; using vpll = vector<pll>;
using vs = vector<string>; using tll = tuple<ll, ll, ll>; using vtll = vector<tll>;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
const ld PI = 3.1415926535897932;
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define co(i) cout << i << endl;
#define co2(i,j) cout << i << " " << j << endl;
#define co3(i) cout << i << " ";
#define po(i) cout << i.first << " " << i.second << endl;
void in() {}
void debug_out() { cerr << endl; }
template<typename Head, typename... Tail>
void debug_out(Head h, Tail... t) {
	cerr << " " << h;
	if (sizeof...(t) > 0) cerr << " :";
	debug_out(t...);
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> vec) {
	for (size_t i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
	return os;
}
ll ctoi(char c) {
	switch (c) {
	case '0': return 0; case '1': return 1; case '2': return 2;
	case '3': return 3; case '4': return 4; case '5': return 5;
	case '6': return 6; case '7': return 7; case '8': return 8;
	case '9': return 9;  default: return 0;
	}
}
bool pairCompare(const pll firstElof, pll secondElof)
{
	return firstElof.second < secondElof.second;
}
//**Snippetリスト**//
//rep, vin, all, iteLoop, bitSearch, bitList, nod, LIS, digitDP, treeDP, Rerooting//
//gcdlcm, isPrime, eratos, primeFactorize, Npow, combination, divisor, modinv, doubling//
//dfs, bfs, dijkstra, WarshallFloyd, BellmanFord, UnionFind, Kruskal, RMQ, LCA, FordFulkerson//
ll i, j, k, l; ll N, M, K, H, W, L, X, Y, Z, R, Q, T;
ll MOD = 1000000007, INF = 1LL << 60, ans = 0, z = 0, o = 1;
vll flag, D; vector<vpll> path; vs S;
int main() {
	int N;
	cin >> N >> Q;
	dsu D(N);
	for (i = 0; i < Q; i++) {
		int t, u, v;
		cin >> t >> u >> v;
		u--; v--;
		if (t == 0) D.merge(u, v);
	}
}

Compiler output:
a.cc:16:10: fatal error: atcoder/all: No such file or directory
   16 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

#define REP(i,n) for(ll i=0;i<(ll)n;i++)
#define dump(x)  cerr << "Line " << __LINE__ << ": " <<  #x << " = " << (x) << "\n";
#define spa << " " <<
#define fi first
#define se second
#define ALL(a)  (a).begin(),(a).end()
#define ALLR(a)  (a).rbegin(),(a).rend()

using ld = long double;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<ld, ld>;

template<typename T> using V = vector<T>;
template<typename T> using P = pair<T, T>;
template<typename T> vector<T> make_vec(size_t n, T a) { return vector<T>(n, a); }
template<typename... Ts> auto make_vec(size_t n, Ts... ts) { return vector<decltype(make_vec(ts...))>(n, make_vec(ts...)); }
template<class S, class T> ostream& operator << (ostream& os, const pair<S, T> v){os << "(" << v.first << ", " << v.second << ")"; return os;}
template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { for (auto &e : v) os << e << ' '; return os; }
template<class T> ostream& operator<<(ostream& os, const vector<vector<T>> &v){ for(auto &e : v){os << e << "\n";} return os;}
struct fast_ios { fast_ios(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;

template <class T> void UNIQUE(vector<T> &x) {sort(ALL(x));x.erase(unique(ALL(x)), x.end());}
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
void fail() { cout << -1 << '\n'; exit(0); }
inline int popcount(const int x) { return __builtin_popcount(x); }
inline int popcount(const ll x) { return __builtin_popcountll(x); }
template<typename T> void debug(vector<vector<T>>&v,ll h,ll w){for(ll i=0;i<h;i++)
{cerr<<v[i][0];for(ll j=1;j<w;j++)cerr spa v[i][j];cerr<<"\n";}};
template<typename T> void debug(vector<T>&v,ll n){if(n!=0)cerr<<v[0];
for(ll i=1;i<n;i++)cerr spa v[i];
cerr<<"\n";};

const ll INF = (1ll<<62);
// const ld EPS   = 1e-10;
// const ld PI    = acos(-1.0);
const ll mod = (int)1e9 + 7;
//const ll mod = 998244353;

int main(){

    ll N, Q;
    cin >> N >> Q;
    dsu d(N);
    while(Q--){
        ll t, u, v;
        cin >> t >> u >> v;
        if(t) cout << d.same(u, v) << "\n";
        else d.merge(u, v);
    }

    return 0;
}

Compiler output:
a.cc:1:10: fatal error: atcoder/dsu: No such file or directory
    1 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

//#define _GLIBCXX_DEBUG
#include "bits/stdc++.h"
#include <atcoder/dsu>
using namespace std;
using namespace atcoder;
using ll = long long;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ld long double
#define al(a) (a).begin(),(a).end()
#define mk make_pair
#define check cout<<"?"<<endl;

ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;

int main(){
    int n,q; cin>>n>>q;
    dsu uf(n);
    rep(_,q){
        int t,u,v; cin>>t>>u>>v;
        if(t==0){
            uf.merge(u,v);
        }
        else{
            printf("%d\n",(int)uf.same(u,v));
        }
    }
}


Compiler output:
a.cc:3:10: fatal error: atcoder/dsu: No such file or directory
    3 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

//#define _GLIBCXX_DEBUG
#include "bits/stdc++.h"
#include <atcoder/dsu.hpp>
using namespace std;
using namespace atcoder;
using ll = long long;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ld long double
#define al(a) (a).begin(),(a).end()
#define mk make_pair
#define check cout<<"?"<<endl;

ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;

int main(){
    int n,q; cin>>n>>q;
    dsu uf(n);
    rep(_,q){
        int t,u,v; cin>>t>>u>>v;
        if(t==0){
            uf.merge(u,v);
        }
        else{
            printf("%d\n",(int)uf.same(u,v));
        }
    }
}


Compiler output:
a.cc:3:10: fatal error: atcoder/dsu.hpp: No such file or directory
    3 | #include <atcoder/dsu.hpp>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

//#define _GLIBCXX_DEBUG
#include "bits/stdc++.h"
#include "atcoder/dsu.hpp"
using namespace std;
using namespace atcoder;
using ll = long long;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ld long double
#define al(a) (a).begin(),(a).end()
#define mk make_pair
#define check cout<<"?"<<endl;

ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;

int main(){
    int n,q; cin>>n>>q;
    dsu uf(n);
    rep(_,q){
        int t,u,v; cin>>t>>u>>v;
        if(t==0){
            uf.merge(u,v);
        }
        else{
            printf("%d\n",(int)uf.same(u,v));
        }
    }
}


Compiler output:
a.cc:3:10: fatal error: atcoder/dsu.hpp: No such file or directory
    3 | #include "atcoder/dsu.hpp"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

    #include <atcoder/dsu>
    #include <iostream>
     
    using namespace std;
    using namespace atcoder;
     
    int main() {
      ios::sync_with_std(false), cin.tie(nullptr);
      int n, q;
      cin >> n >> q;
      dsu D(n);
      while (q--) {
        int t, u, v;
        cin >> t >> u >> v;
        if (t == 0)
          D.merge(u, v);
        else
          cout << int(D.same(u, v)) << '\n';
      }
      return 0;
    }

Compiler output:
a.cc:1:14: fatal error: atcoder/dsu: No such file or directory
    1 |     #include <atcoder/dsu>
      |              ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <atcoder/dsu>

#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
int main()
{
	int N,Q;
  	cin >> N >> Q;
  	dsu D(N);
  	//for (int i=0; i<N; ++i) parent[i]=i;
  	while (Q--)
    {
      	int type, node1, node2;
      	cin >> type >> node1 >> node2;
      	if (type==0) D.merge(node1, node2);
      	else cout << D.same(node1, node2) << "\n";
    }
}

Compiler output:
a.cc:1:10: fatal error: atcoder/dsu: No such file or directory
    1 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <atcoder/dsu>
#include <iostream>

using namespace std;
using namespace atcoder;

int main() {
  ios::sync_with_std(false), cin.tie(nullptr);
  int n, q;
  cin >> n >> q;
  dsu D(n);
  while (q--) {
    int t, u, v;
    cin >> t >> u >> v;
    if (t == 0)
      D.merge(u, v);
    else
      cout << int(D.same(u, v)) << '\n';
  }
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: atcoder/dsu: No such file or directory
    1 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>

#define ll long long int
#define ld long double
#define yorn(f) cout<<((f)?"Yes":"No")<<endl;
#define YORN(f) cout<<((f)?"YES":"NO")<<endl;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repi(i, n) for (ll i = 1; i < (ll)(n); i++)
#define all(x) (x).begin(), (x).end()
#define put(x) cout << x << endl;
#define println(x) cout << x << endl;
using namespace std;
using namespace atcoder;

void Main()
{
    ll n, Q;
    cin >> n >> Q;

    vector<ll> t(Q), u(Q), v(Q);
    rep(i, Q) cin >> t[i] >> u[i] >> v[i];
    
    dsu d(n);
    rep(i, Q) {
        if (t[i] == 0) {
            d.merge(u[i], v[i]);
        }
        else {
            if (d.same(u[i], v[i])) {
                put("1");
            }
            else {
                put(0);
            }
        }
    }
    
}
signed main(){ Main();return 0;}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <all>
#define rep(i, n) for (innt i = 0; i < (int)n; ++i)
#define rrep(i, n) for (int i = (int)n-1; i >= 0; --i)
using namespace std;
using namespace atcoder;
using ll = long long;

template<typename T>
inline bool chmax(T& a, const T& b) {
    if (a < b){
        a = b;
        return true;
    }
    return false;
}

template<typename T>
inline bool chmin(T& a, const T& b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}

/**
 * @brief 多次元 vector の作成
 * @author えびちゃん
 */
namespace detail {
    template<typename T, int N>
    auto make_vec(vector<int>& sizes, T const& x) {
        if constexpr (N == 1) {
            return vector(sizes[0], x);
        } else {
            int size = sizes[N-1];
            sizes.pop_back();
            return vector(size, make_vec<T, N-1>(sizes, x));
        }
    }
}
template<typename T, int N>
auto make_vec(int const(&sizes)[N], T const& x = T()) {
    vector<int> s(N);
    for (int i = 0; i < N; ++i) s[i] = sizes[N-i-1];
    return detail::make_vec<T, N>(s, x);
}

__attribute__((constructor))
void fast_io() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
}

int main() {
    int n, q;
    cin >> n >> q;
    dsu d(n);
    while (q--) {
        int t, u, v;
        cin >> t >> u >> v;
        if (t == 0) {
            d.merge(u, v);
        } else {
            cout << d.same(u, v) << '\n';
        }
    }
}


Compiler output:
a.cc:2:10: fatal error: all: No such file or directory
    2 | #include <all>
      |          ^~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/dsu>
using namespace std;
using namespace atcoder;
int main()
{
	int N,Q;
  	cin >> N >> Q;
  	dsu D(N);
  	//for (int i=0; i<N; ++i) parent[i]=i;
  	while (Q--)
    {
      	int type, node1, node2;
      	cin >> type >> node1 >> node2;
      	if (type==0) D.merge(node1, node2);
      	else cout << D.same(node1, node2) << "\n";
    }
}

Compiler output:
a.cc:2:10: fatal error: atcoder/dsu: No such file or directory
    2 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
#define rep(i, n) for (innt i = 0; i < (int)n; ++i)
#define rrep(i, n) for (int i = (int)n-1; i >= 0; --i)
using namespace std;
using namespace atcoder;
using ll = long long;

template<typename T>
inline bool chmax(T& a, const T& b) {
    if (a < b){
        a = b;
        return true;
    }
    return false;
}

template<typename T>
inline bool chmin(T& a, const T& b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}

/**
 * @brief 多次元 vector の作成
 * @author えびちゃん
 */
namespace detail {
    template<typename T, int N>
    auto make_vec(vector<int>& sizes, T const& x) {
        if constexpr (N == 1) {
            return vector(sizes[0], x);
        } else {
            int size = sizes[N-1];
            sizes.pop_back();
            return vector(size, make_vec<T, N-1>(sizes, x));
        }
    }
}
template<typename T, int N>
auto make_vec(int const(&sizes)[N], T const& x = T()) {
    vector<int> s(N);
    for (int i = 0; i < N; ++i) s[i] = sizes[N-i-1];
    return detail::make_vec<T, N>(s, x);
}

__attribute__((constructor))
void fast_io() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
}

int main() {
    int n, q;
    cin >> n >> q;
    dsu d(n);
    while (q--) {
        int t, u, v;
        cin >> t >> u >> v;
        if (t == 0) {
            d.merge(u, v);
        } else {
            cout << d.same(u, v) << '\n';
        }
    }
}


Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const ll MOD = 1000000007;
int main() {
  int N, Q;
  cin >> N >> Q;
  dsu d(N + 1);
  REP(i, Q) {
    int t, u, v;
    cin >> t >> u >> v;
    if (t) {
      printf("%d\n", d.same(u, v) ? 1 : 0);
    } else {
      d.merge(u, v);
    }
  }
}

Compiler output:
a.cc:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#include<atcoder/dsu>
using namespace std;
using namespace atcoder;
#define ll  long long
#define endl '\n'
#define FASTINOUT ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int main()
{
    FASTINOUT;
    int x,q;
    cin>>x>>q;
    dsu d(x);
    for (int i=0; i<q; i++)
    {
        int t,r,l;
        cin>>t>>l>>r;
        if (t==0)
            d.merge(l,r);
        else
        {
            if (d.same(l,r))
                cout<<1<<endl;
            else
                cout<<0<<endl;
        }
    }
    return 0;
}


Compiler output:
a.cc:2:9: fatal error: atcoder/dsu: No such file or directory
    2 | #include<atcoder/dsu>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
// #include <atcoder/convolution>
#include <atcoder/dsu>
// #include <atcoder/fenwicktree>
// #include <atcoder/lazysegtree>
// #include <atcoder/math>
// #include <atcoder/maxflow>
// #include <atcoder/mincostflow>
// #include <atcoder/modint>
// #include <atcoder/scc>
// #include <atcoder/segtree>
// #include <atcoder/string>
// #include <atcoder/twosat>
#define rep(i, a) for (int i = (int)0; i < (int)a; ++i)
#define rrep(i, a) for (int i = (int)a - 1; i >= 0; --i)
#define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define RREP(i, a, b) for (int i = (int)a - 1; i >= b; --i)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define popcount __builtin_popcount
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;


template <class T>
inline bool chmin(T &a, T b)
{
	if (a > b)
	{
		a = b;
		return true;
	}
	return false;
}
template <class T>
inline bool chmax(T &a, T b)
{
	if (a < b)
	{
		a = b;
		return true;
	}
	return false;
}

ll gcd(ll n, ll m)
{
	ll tmp;
	while (m != 0)
	{
		tmp = n % m;
		n = m;
		m = tmp;
	}
	return n;
}

ll lcm(ll n, ll m)
{
	return abs(n) / gcd(n, m) * abs(m); //gl=xy
}

using namespace std;
using namespace atcoder;

void solve(){
	// ll t1,t2;
	// cin>>t1>>t2;
	// ll a1,a2,b1,b2;
	// cin>>a1>>a2>>b1>>b2;
	// if(a1*t1+a2*t2==b1*t1+b2*t2){
	// 	cout<<"infinity\n";
	// }
	// else if(a1*t1<b1*t1&&a2*t2<b2*t2){
	// 	cout<<0<<"\n";
	// }
	// else if(a1*t1>b1*t1&&a2*t2>b2*t2){
	// 	cout<<0<<"\n";
	// }
	// else{
	// 	ll ans=0;
	// 	ll x=abs(a1-b1)*t1;
	// 	ll y=abs(a1*t1+a2*t2-b1*t1-b2*t2);
	// 	ans+=x/y*2;
	// 	if(x<y)ans=1;
	// 	else if(x%y)++ans;
	// 	cout<<ans<<"\n";
	// }
	int n,q;
	cin>>n>>q;
	dsu tree(n);
	while(q--){
		int t,u,v;
		cin>>t>>u>>v;
		if(t==0)tree.merge(u,v);
		else{
			cout<<tree.same(u,v)<<"\n";
		}
	}
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout << fixed << setprecision(15);
	solve();
	return 0;
}


Compiler output:
a.cc:3:10: fatal error: atcoder/dsu: No such file or directory
    3 | #include <atcoder/dsu>
      |          ^~~~~~~~~~~~~
compilation terminated.