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

#include "atcoder/dsu"
#include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL<<60;
const long long int Mod = 1000000007;
using ll = long long int; using ci = const int;
using vi = vector<int>;  using Vi = vector<long long int>;
using P = pair<int, int>;  using PLL = pair<ll, ll>;
using matrix = vector<vector<ll>>;
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rp(i,N) for(ll i = 0; i < (ll)N; i++)
#define repi(i,a,b) for(ll i = ll(a); i < ll(b); ++i)
template<class T>bool chmax(T &former, const T &b) { if (former<b) { former=b; return true; } return false; }
template<class T>bool chmin(T &former, const T &b) { if (b<former) { former=b; return true; } return false; }
template<class T>T sqar(T x){ return x*x; }//sqrt(x)は平方根;
#define Sort(v) std::sort(v.begin(), v.end(), std::greater<decltype(v[0])>()) //降順でVをソート
#define p_queue(v) priority_queue<v, vector<v>, greater<v> >
template<class T> inline void princ(T x){cout<<x<<" ";}; 
template<class T> inline void print(T x){cout<<x<<"\n";};
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
///////////////////////////////////////////////////////////////////////////////////

void solve(){
    ll n,q;
    cin >> n >> q;
    atcoder::dsu uf(n);
    while(q--){
        ll t,u,v;
        cin >> t >> u >> v;
        if(t==0){
            uf.merge(u,v);
        }else{
            if(uf.same(u,v)){
                print(1);
            }else{
                print(0);
            }
        }
    }
    return;
}
int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    std::cout<<std::fixed<<std::setprecision(30);
    solve();
    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 <all>
using namespace std;
using namespace atcoder;
#define ll long long
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define rep1(i, n) FOR(i, 1, n+1)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define whole(x) (x).begin(),(x).end()
#define rwhole(x) (x).rbegin(), (x).rend()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define P pair<int, int>
#define debug(var) cerr << "[" << #var << "] " << var << endl
template<typename T1, typename T2>
bool chmax(T1 &a,T2 b){if(a<b){a=b;return true;}else return false;}
template<typename T1, typename T2>
bool chmin(T1 &a,T2 b){if(a>b){a=b;return true;}else return false;}
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define pr(s) cout << (s) << '\n'
const ll mod = 1000000007;
const int dx[] = {-1,0,1,0};
const int dy[] = {0,-1,0,1};
const int INF = 1001001001;
const ll INFll = 1E+18;


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n, q;
    cin >> n >> q;
    dsu d(n);
    
    rep(i, q) {
        int t, u, v;
        cin >> t >> u >> v;
        if (t==0) {
            d.merge(u, v);
        }
        else {
            int ans = d.same(u, v);
            pr(ans);
        }
    }
    
    
    return 0;
}


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/all>
using namespace std;
typedef long long ll;
#define REP(i, n) for(ll i = 0; i < (ll)(n); ++i)
#define FOR(i, a, b) for(ll i=(a); i < (ll)(b); ++i)
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(){
	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{
			if(d.same(u,v)){
				cout << 1 << endl;
			}else{
				cout << 0 << 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/dsu.h"
#define rep(i, n) for (int i = 0; (i) < (int) (n); (i) ++)
using namespace std;
using namespace atcoder;

int main() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        int n, q;
        cin >> n >> q;
        dsu uf(n);
        rep(i, q) {
                int t, u, v;
                cin >> t >> u >> v;
                if (t) {
                        cout << uf.same(u, v) << '\n';
                } else {
                        uf.merge(u, v);
                }
        }
        return 0;
}


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

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

int main() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        int n, q;
        cin >> n >> q;
        dsu uf(n);
        rep(i, q) {
                int t, u, v;
                cin >> t >> u >> v;
                if (t) {
                        cout << uf.same(u, v) << '\n';
                } else {
                        uf.merge(u, v);
                }
        }
        return 0;
}


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

#include<bits/stdc++.h>
#include<atcoder/all>
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 a, b, c;
    cin >> a >> b >> c;
    b--; c--;
    if(a == 0){
      d.merge(b,c);
    }
    else{
      if(d.same(a,b)){
        cout << 1 << endl;
      }
      else{
        cout << 0 << endl;
      }
    }
  }
}

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/dsu>
using namespace std;
using namespace atcoder;
#define ll long long
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define rep1(i, n) FOR(i, 1, n+1)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define whole(x) (x).begin(),(x).end()
#define rwhole(x) (x).rbegin(), (x).rend()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define P pair<int, int>
#define debug(var) cerr << "[" << #var << "] " << var << endl
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define eb emplace_back
#define pr(s) cout << (s) << '\n'
const ll mod = 1000000007;
const int dx[] = {-1,0,1,0};
const int dy[] = {0,-1,0,1};


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n, q;
    cin >> n >> q;
    dsu d(n);
    debug(n);
    rep(i, q) {
        int t, u, v;
        cin >> t >> u >> v;
        u--; v--;
        if (t==0) d.merge(u, v);
        else {
            int ans = 0;
            if (d.same(u, v)) ans = 1;
            pr(ans);
        }
    }
    
    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/all>
#define endl "\n"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

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

const long long INF = 1e18;
//const ll mod = 1000000007;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N, Q;
    cin >> N >> Q;
    auto uni = atcoder::dsu(N);
    for(int q = 0; q < Q; q++) {
        int t, u, v;
        cin >> t >> u >> v;
        if(t == 0) uni.merge(u, v);
        else cout << uni.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++

//To compile : type "$     g++ test.cpp -std=c++14 -I .    "
#include <atcoder/all>
#include <bits/stdc++.h>
//#include <chrono>
//#pragma GCC optimize("Ofast")
using namespace std;
using namespace atcoder;
#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
#define Rreps(i,n,e) for(int i = n - 1; i >= e; --i)
#define Rrep(i,n) Rreps(i,n,0)
#define ALL(a) a.begin(), a.end()
#define fi first
#define se second
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;

ll N,M,H,W,Q,K,A,B;
string S;
typedef pair<ll, ll> P;
const ll INF = (1LL<<60);

int main() {
	int n, q;
	cin>>n>>q;
	dsu uf(n);
	rep(i,q){
		int t, u, v;
		cin>>t>>u>>v;
		if(t == 0){
			uf.merge(u, v);
		}else{
			cout<<uf.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++

#define _USE_MATH_DEFIMES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <atcoder/dsu>

const int MOD = 1'000'000'007;
const int INF = 1'000'000'000; //1e9
const int NIL = -1;
const long long LINF = 1'000'000'000'000'000'000; // 1e18
const long double EPS = 1E-10;

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







#include <algorithm>
#include <vector>


class UnionFind{
    int n;
    std::vector<int> par;//根ならマイナス*要素数

public:
    UnionFind(): n(0){}
    UnionFind(int N): n(N), par(n){
        for(int i(0); i < n; ++i){
            par[i] = -1;
        }
    }

    void resize(int N){
        n = N;
        par.resize(n, -1);
    }

    int find(int x){
        if(par[x] < 0) return x;
        else return par[x] = find(par[x]);
    }

    bool unit(int x, int y){
        x = find(x);
        y = find(y);
        if(x == y) return false;

        if(-par[x] < -par[y]) std::swap(x, y); 
        par[x] += par[y];
        par[y] = x;
        return true;
    }

    bool same(int x, int y){
        return find(x) == find(y);
    }

    int howmany(int x){ //同じグループに属すものの個数(自分を含む)
        return -par[find(x)];
    }

    std::vector<std::vector<int>> groups(){
        std::vector<int> rtbuf(n), gsz(n);
        for(int i(0); i < n; ++i){
            rtbuf[i] = find(i);
            ++gsz[rtbuf[i]];
        }
        std::vector<std::vector<int>> ret(n);
        for(int i(0); i < n; ++i){
            ret[i].reserve(gsz[i]);
        }
        for(int i(0); i < n; ++i){
            ret[rtbuf[i]].push_back(i);
        }
        ret.erase(
            std::remove_if(std::begin(ret), std::end(ret),
                [&](const std::vector<int>& v) { return v.empty(); }),
            std::end(ret));
        return ret;
    }
};


int main(){
    int N, Q; std::cin >> N >> Q;
    UnionFind d(N);
    std::vector<std::vector<int>> ls;
    {
        int t, u, v;
        for(int i(0); i < Q; ++i){
            std::cin >> t >> u >> v;
            if(t){
                std::cout << d.same(u, v) << "\n";
            }else d.unit(u, v);
        }
    }
    return 0;
}


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

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

typedef long long ll;

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

Compiler output:
a.cc:4:17: error: 'atcoder' is not a namespace-name
    4 | using namespace atcoder;
      |                 ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:5: error: 'dsu' was not declared in this scope
   11 |     dsu d(N);
      |     ^~~
a.cc:15:21: error: 'd' was not declared in this scope
   15 |             cout << d.same(u, v) << "\n";
      |                     ^
a.cc:17:13: error: 'd' was not declared in this scope
   17 |             d.merge(u, v);
      |             ^
Language: C++

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

typedef long long ll;

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

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(){
  int n,q;
  cin>>n>>q;
  dsu s(n);
  for(int _=0;_<q;_++){
    int t,u,v;
    cin>>t>>u>>v;
    if(t==0)
      s.merge(u,v);
    if(t==1)
      cout<<s.same(u,v)<<endl;
  }
}

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;
using ll=long long;
template<class T,class U> inline bool chmin(T&x,U y){if(x>y){x=y;return true;}return false;}
template<class T,class U> inline bool chmax(T&x,U y){if(x<y){x=y;return true;}return false;}
#define fr(i,n) for(int i=0;i<(n);++i)
#define Fr(i,n) for(int i=1;i<=(n);++i)
#define ifr(i,n) for(int i=(n)-1;i>=0;--i)
#define iFr(i,n) for(int i=(n);i>0;--i)

void solve(){
    int n,q;
    cin>>n>>q;
    dsu d(n);
    {
        int t,u,v;
        fr(_,q){
            cin>>t>>u>>v;
            if(t) cout<<d.same(u,v)<<'\n';
            else d.merge(u,v);
        }
    }
}

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    solve();
}


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>
typedef long long ll;
#define REP(i, n) for(int i = 0; i < n; i++)
#define REP2(i, a, b) for(int i = a;i <= b;i++)
#define REPR(i, a, b) for(int i = a; i >= b; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define MOD 1000000007
#define PI 3.14159265358979323846
#define vi vector<int>
#define vll vector<ll>
#define vi2 vector<vector<int>>
#define eb emplace_back
#define fi first
#define se second
#define ALL(v) v.begin(), v.end()
#define sz(x) int(x.size())
using namespace std;
using namespace atcoder;
using P = pair<ll,ll>;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};
#define INT(name) int name;cin >> name;
#define VEC(type,name,n) vector<type> name(n);REP(i,n) cin >> name[i];

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;
}

int main()
{
  ll N,Q;
  cin >> N >> Q;
  dsu d(N);
  REP(i, Q){
    ll t,u,v;
    cin >> t >> 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:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

//#define _GLIBCXX_DEBUG
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wpedantic"
#include "atcoder/all"
#pragma GCC diagnostic warning "-Wall"
#pragma GCC diagnostic warning "-Wextra"
#pragma GCC diagnostic warning "-Wconversion"
#pragma GCC diagnostic warning "-Wpedantic"
#include <bits/stdc++.h>
#define int long long
#define ll long long
using ull = unsigned long long;
using namespace std;
#define dump(x)                             \
    if (dbg) {                              \
        cerr << #x << " = " << (x) << endl; \
    }
#define overload4(_1, _2, _3, _4, name, ...) name
#define FOR1(n) for (ll i = 0; i < (n); ++i)
#define FOR2(i, n) for (ll i = 0; i < (n); ++i)
#define FOR3(i, a, b) for (ll i = (a); i < (b); ++i)
#define FOR4(i, a, b, c) for (ll i = (a); i < (b); i += (c))
#define FOR(...) overload4(__VA_ARGS__, FOR4, FOR3, FOR2, FOR1)(__VA_ARGS__)
#define FORR(i, a, b) for (int i = (a); i <= (b); ++i)
#define bit(n, k) (((n) >> (k)) & 1) /*nのk bit目*/
namespace mydef {
const int INF = 1ll << 60;
const int MOD = 1e9 + 7;
template <class T>
bool chmin(T& a, const T& b) {
    if (a > b) {
        a = b;
        return 1;
    } else
        return 0;
}
template <class T>
bool chmax(T& a, const T& b) {
    if (a < b) {
        a = b;
        return 1;
    } else
        return 0;
}
void Yes(bool flag = true) {
    if (flag)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
}
void No(bool flag = true) {
    Yes(!flag);
}
void YES(bool flag = true) {
    if (flag)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
}
void NO(bool flag = true) {
    YES(!flag);
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T& val) {
    std::fill((T*)array, (T*)(array + N), val);
}
bool dbg = true;
}  // namespace mydef
using namespace mydef;
#define pb push_back
//#define mp make_pair
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define all(v) (v).begin(), (v).end()
#define SZ(x) ((int)(x).size())
#define vi vector<int>
#define vvi vector<vector<int>>
#define vp vector<pair<int, int>>
#define vvp vector<vector<pair<int, int>>>
#define pi pair<int, int>
//#define P pair<int, int>
//#define V vector<int>
//#define S set<int>
#define asn ans
using namespace atcoder;

int N, Q;

void solve() {
}

signed main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    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) ? 1 : 0) << endl;
        }
    }

    solve();
    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const ll P = 1e9+7;
const ll N = 2e6+7;

//Modifiable-DSU
//Using path compression and union by size

vector<ll> parent(N);
vector<ll> SS(N);
void initialize(ll node)
{
	parent.at(node) = node;
	SS.at(node) = 1;
}
ll find_parent(ll node)
{
	if(parent.at(node) == node) return node;
	return parent.at(node) = find_parent(parent.at(node));
}
void merge_set(ll a, ll b)
{
	a = find_parent(a);
	b = find_parent(b);

	if(a != b)
	{
		if(SS.at(a) < SS.at(b))
			swap(a,b);
		parent.at(b) = a;
		SS.at(a) += SS.at(b);
	}
}

int main(){

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	ll t=1;
	// cin>>t;

	while(t--){
		ll n,q;
		cin>>n>>q;

		vector<pair<ll,ll>> p;
		ll x,a,b;
		while(q--){
			cin>>x>>a>>b;
			++a, ++b;
			if(!x){
				initialize(a);
				initialize(b);
				merge_set(a,b);
			}
			else{
				ll x = find_parent(a) , y = find_parent(b);
				if(x == y and x s!= 0) cout<<"1\n";
				else cout<<"0\n";
			}
			
		}

	}	

	return 0;
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:61:48: error: expected ')' before 's'
   61 |                                 if(x == y and x s!= 0) cout<<"1\n";
      |                                   ~            ^~
      |                                                )
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
typedef long long ll;
#define REP(i, n) for(int i = 0; i < n; i++)
#define REP2(i, a, b) for(int i = a;i <= b;i++)
#define REPR(i, a, b) for(int i = a; i >= b; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define MOD 1000000007
#define PI 3.14159265358979323846
#define vi vector<int>
#define vll vector<ll>
#define vi2 vector<vector<int>>
#define eb emplace_back
#define fi first
#define se second
#define ALL(v) v.begin(), v.end()
#define sz(x) int(x.size())
using namespace std;
using namespace atcoder;
using P = pair<ll,ll>;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};
#define INT(name) int name;cin >> name;
#define VEC(type,name,n) vector<type> name(n);REP(i,n) cin >> name[i];

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;
}

int main()
{
  ll N,Q;
  cin >> N >> Q;
  dsu d(N);
  vector<vector<int>> A(Q,vector<int>(3));
  vector<int> ans;
  REP(i, Q){
    REP(j, 3){
      cin >> A.at(i).at(j);
    }
    if(A[i][0]==0){
      d.merge(A[i][1],A[i][2]);
    }else{
      if(d.same(A[i][1],A[i][2])){
        ans.push_back(1);
      }else{
        ans.push_back(0);
      }
    }
  }
  
  REP(i,sz(ans)){
    cout << ans[i] << 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 <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using pint = pair<int, int>;
using ll = long long;
using ull = unsigned long long;
using vll = vector<long long>;
using pll = pair<ll, ll>;
#define FOR(i, begin, end) \
    for (int i = (begin), i##_end_ = (end); i < i##_end_; i++)
#define IFOR(i, begin, end) \
    for (int i = (end)-1, i##_begin_ = (begin); i >= i##_begin_; i--)
#define REP(i, n) FOR(i, 0, n)
#define IREP(i, n) IFOR(i, 0, n)
#define VREP(s, ite) for (auto ite = s.begin(); ite != s.end(); ++ite)
#define FI first
#define SE second
#define ALL(v) v.begin(), v.end()
#define endl "\n"
#define ciosup  \
    cin.tie(0); \
    ios::sync_with_stdio(false);
#define eb emplace_back
#define vint vector<int>
constexpr ll INF = 1e15 + 7LL;
/* constexpr ll MOD = ll(1e9) + 7LL; */
/* constexpr ll MOD = 998244353LL; */
ll MOD = 200003LL;

template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
    for (int i = 0; i < (int)v.size(); ++i) {
        is >> v[i];
    }
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    if (v.size() == 0) return os;
    for (int i = 0; i < (int)v.size() - 1; ++i) {
        os << v[i] << " ";
    }
    os << v[v.size() - 1];
    return os;
}

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

int main() {
    solve();
    char tmp;
    while (cin >> tmp) {
        cin.putback(tmp);
        solve();
    }
}


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 <iostream>
using namespace std;
using namespace atcoder;

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


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

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

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


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 <boost/multiprecision/gmp.hpp>

typedef boost::multiprecision::mpf_float BigDec;
using namespace std;

int main() {
  string a, b, c, s;
  cin >> a >> b >> c >> s;
  BigDec b1(a), b2(b), b3(c);
  cout << (b1 + b2 + b3) << " " << s << endl;
}


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

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

int main(){
    int n, q;
    cin >> n >> q;
    atcoder::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;
}

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"
using namespace std;

int main(){
    int n, q;
    cin >> n >> q;
    atcoder::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;
}

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/all"
using namespace std;

int main(){
    int n, q;
    cin >> n >> q;
    atcoder::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;
}

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>
#define ll long long int
#define MOD 1000000007
#define P pair<ll,ll>
#define INF 1000000000000000000

using namespace atcoder;
using namespace std;

int main(void){
  ll n, q;
  cin >> n >> q;
  
  dsu d(n);
  for (int i = 0; i < q; i++){
    ll t;
    cin >> t;
    ll u, v;
    cin >> u >> v;
    
    if (!t){
      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>
#define ll long long int
#define MOD 1000000007
#define P pair<ll,ll>
#define INF 1000000000000000000

using namespace atcoder;
using namespace std;

int main(void){
  ll n, q;
  cin >> n >> q;
  
  dsu d(n);
  for (int i = 0; i < q; i++){
    ll t;
    cin >> t;
    ll u, v;
    cin >> u >> v;
    
    if (t){
      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>
#define ll long long int
#define MOD 1000000007
#define P pair<ll,ll>
#define INF 1000000000000000000

using namespace std;

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

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'dsu' was not declared in this scope
   13 |   dsu d(n);
      |   ^~~
a.cc:21:7: error: 'd' was not declared in this scope
   21 |       d.merge(u, v);
      |       ^
a.cc:24:15: error: 'd' was not declared in this scope
   24 |       cout << d.same(u, v) << endl;
      |               ^
Language: C++

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

#define rep(i, n) for(int i = 0; i < (n); ++i)
#define repr(i, n) for(int i = (n-1); i >= 0; --i)

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; }

typedef long long ll;
typedef pair<int, int> P;

const int MAX = 200005;
const int INF = 1001001001;
const int MOD = 1000000007;

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

    dsu d(N);
    rep(i, Q) {
        int t, u, v;
        cin >> t >> u >> v;

        if (t == 0) {
            d.merge(u, v);
        }

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

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

#include <stdio.h>
#include <math.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#include <string>
#include <map>
#include <bitset>
#include <stack>
#include <atcoder/all>
//#include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
using namespace atcoder;
#define urept(soeji, start, n) for (int soeji = start; soeji < n; soeji++)
#define drept(soeji, start, n) for (int soeji = start; soeji > n; soeji--)

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;
    }
}

lli gcd2(lli x, lli y)
{
    lli t;
    while (y != 0)
        t = x % y, x = y, y = t;
    return (x);
}

lli lcm2(lli x, lli y)
{
    lli xy = x * y;
    if (xy < 0)
        xy = -xy;
    return (xy / gcd2(x, y));
}

int main(void)
{
    int N, Q;
    cin >> N >> Q;
    int a, b, c;
    dsu d(N);
    for (int i = 0; i < Q; i++)
    {

        cin >> c >> a >> b;
        if (c == 0)
        {
            d.merge(a, b);
        }
        else
        {
            if (d.same(a, b))
            {
                cout << 1 << endl;
            }
            else
            {
                cout << 0 << endl;
            }
        }
    }
    return 0;
}


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

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <queue>
#include <bitset>
#include <stack>
#include <functional>

// AtCoder
#include <atcoder/all>
using namespace atcoder;

#ifdef LOCAL
    #define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
    #define eprintf(...)
#endif

#define rep_(i, a_, b_, a, b, ...) for (int i = (a), i##_len = (b); i < i##_len; ++i)
#define rep(i, ...) rep_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define reprev_(i, a_, b_, a, b, ...) for (int i = (b-1), i##_min = (a); i >= i##_min; --i)
#define reprev(i, ...) reprev_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define all(x) (x).begin(), (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 (b < a) { a = b; return 1; } return 0; }
#define fls(x) (64 - __builtin_clzll(x))
#define pcnt(x) __builtin_popcountll(x)
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair <int,int> P;
typedef long double ld;

int main (void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, q; cin >> n >> q;
    dsu uf(n);
    rep (_, q) {
        int c, u, v; cin >> c >> u >> v;
        if (c == 0) uf.merge(u, v);
        else cout << uf.same(u, v) << "\n";
    }
    return 0;
}

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

#include <iostream>
#include <iomanip>
#include <algorithm>
#include <array>
#include <cassert>
#include <utility>
#include <vector>
#include <atcoder/dsu>

template <class InputIterator>
std::ostream& range_output(std::ostream& os_arg, InputIterator first_arg, InputIterator last_arg){ if(first_arg != last_arg){ do{ os_arg << *(first_arg++); if(first_arg == last_arg) break; os_arg << ' '; } while(true); }  return os_arg; }
template <class Tp> std::ostream& operator << (std::ostream& os_arg, const std::vector<Tp>& arr_arg){ return range_output(os_arg, arr_arg.cbegin(), arr_arg.cend()); }
template <class Tp, std::size_t Size> std::ostream& operator << (std::ostream& os_arg, const std::array<Tp, Size>& arr_arg){ return range_output(os_arg, arr_arg.cbegin(), arr_arg.cend()); }
template <class S, class T> std::ostream& operator << (std::ostream& os_arg, const std::pair<S, T>& pair_arg){ return os_arg << '(' << pair_arg.first << ", " << pair_arg.second << ')'; }

#ifndef ONLINE_JUDGE
    template <typename Head> void dump_out(Head head_arg){ std::cerr << head_arg << '\n'; }
    template <typename Head, typename... Tail>
    void dump_out(Head head_arg, Tail... tail_args){ std::cerr << head_arg << ", "; dump_out(tail_args...); }
    #define dump(...) do { std::cerr << "[in line " << __LINE__ << "] " << #__VA_ARGS__ << " : "; dump_out(__VA_ARGS__); } while(false)
#else
    #define dump(...) (void(0))
#endif


int main(void){
    std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); 
    std::cout << std::fixed << std::setprecision(16);
    int n, q; std::cin >> n >> q;
    atcoder::dsu uf(n);
    while(q--){
        char c; int u, v; std::cin >> c >> u >> v;
        if(c == '0') uf.merge(u, v);
        else{
            if(uf.same(u, v)) std::cout << '1' << '\n';
            else std::cout << '0' << '\n';
        }
    }
    return 0;
}

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

#include <algorithm>
#include <atcoder/all>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;
using namespace atcoder;
using ll = long long;

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 {
            if (d.same(u, v)) {
                cout << 1 << endl;
            } else {
                cout << 0 << 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 <iostream>
#include <atcoder/dsu>

using namespace std;
using namespace atcoder;

int main(int argc, char *argv[])
{
  int n,q; cin >> n >> q;
  dsu d(n);
  while(q-- > 0) {
    int t,u,v; cin >> t >> u >> v;
    if(t == 0) {
      d.merge(u, v);
    }
    else {
      cout << (d.same(u, v) ? 1 : 0) << "\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 <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;

using mint = modint1000000007;
// using mint = modint998244353;

typedef int64_t Int;
#define all(x) (x).begin(), (x).end()
 
const double EPS = 1e-10;
const Int INF = 1e18;
const int inf = 1e9;
const Int mod = 1e9+7;

bool print_space_enable = false;
void print() { 
    cout << '\n'; 
    print_space_enable = false;
}

template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail) {
    if (print_space_enable) std::cout << " ";
    cout << fixed << setprecision(15) << head;
    print_space_enable = true;
    print(std::forward<Tail>(tail)...);
}

template<typename T>
void print(vector<T> v) {
    for (size_t i = 0; i < v.size(); i++) {
        if (i > 0) std::cout << " ";
        std::cout << v[i];
    }
    std::cout << '\n';
}

void solve() {
    Int n;
    cin >> n;
    dsu d(n);
    Int q;
    cin >> q;
    vector<tuple<Int, Int, Int>> v(q);
    for (Int i = 0; i < q; i++) {
        Int t, a, b;
        cin >> t >> a >> b;
        v[i] = tie(t, a, b);
    }
    for (Int i = 0; i < q; i++) {
        Int t, a, b;
        tie(t, a, b) = v[i];
        if (t == 0) {
            d.merge(a, b);
        }
        if (t == 1) {
            print(d.same(a, b));
        }
    }
}

int main() {
    solve();
    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 <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;

int main() {
  long n,q,t,u,v;
  cin >> n >> q;
  dsu d(n);
  for(long i=0;i<q;i++) {
    cin >> t >> 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:1:10: fatal error: atcoder/all: No such file or directory
    1 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main(){
    int n, q;
    cin >> n >> q;
    atcoder::dsu dsu(n);
    
    for (int i = 0; i < q; i++){
        int t, u, v;
        cin >> t >> u >> v;
        if (t == 0)
            dsu.merge(u, v);
        else
            prinf("%d\n", dsu.same(u, v));
    }
}

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;
    atcoder::dsu dsu(n);
    
    for (int i = 0; i < q; i++){
        int t, u, v;
        cin >> t >> u >> v;
        if (t == 0)
            dsu.merge(u, v);
        else
            cout << dsu.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/dsu> // NOTE: AtCoderライブラリ
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using namespace atcoder; // NOTE: AtCoderライブラリ
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef pair<int, int> pii;
// #define INF __INT32_MAX__
#define INF 1e9
#define LINF __LONG_LONG_MAX__

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

    rep(i, Q) {
        int t, u, v;
        cin >> t >> 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:2:10: fatal error: atcoder/dsu: No such file or directory
    2 | #include <atcoder/dsu> // NOTE: AtCoderライブラリ
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all> // NOTE: AtCoderライブラリ
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using namespace atcoder; // NOTE: AtCoderライブラリ
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef pair<int, int> pii;
// #define INF __INT32_MAX__
#define INF 1e9
#define LINF __LONG_LONG_MAX__

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

    rep(i, Q) {
        int t, u, v;
        cin >> t >> 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:2:10: fatal error: atcoder/all: No such file or directory
    2 | #include <atcoder/all> // NOTE: AtCoderライブラリ
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <atcoder/all>

using namespace std;
using namespace atcoder;
typedef long long ll;

int main() {
  ll n, q;
  cin >> n >> q;
  dsu uf(n);

  while (q--) {
    ll t, u, v;
    cin >> t >> u >> v;
    if (t == 0) {
      uf.merge(u, v);
    } else if (t == 1) {
      if (uf.same(u, v)) {
        cout << 1 << endl;
      } else {
        cout << 0 << endl;
      }
    }
  }
  
}


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

#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
// #include<bits/stdc++.h>
#include<iostream>
#include<bitset>
#include<atcoder/all>

using namespace std;
#define rep(i,s,t) for(ll i = (ll)(s); i < (ll)(t); i++)
#define rrep(i,s,t) for(ll i = (ll)(s-1);(ll)(t) <= i; i--)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> Pll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<vvl> vvvl;
constexpr ll INF = numeric_limits<ll>::max()/4;
constexpr ll n_max = 2e5+10;
#define int ll

template <typename A, typename B>
string to_string(pair<A, B> p);
string to_string(const string &s) {return '"' + s + '"';}
string to_string(const char *c) {return to_string((string) c);}
string to_string(bool b) {return (b ? "true" : "false");}
template <size_t N>
string to_string(bitset<N> v){
    string res = "";
    for(size_t i = 0; i < N; i++) res += static_cast<char>('0' + v[i]);
    return res;
}
template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for(const auto &x : v) {
        if(!first) res += ", ";
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p){return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";}

void debug_out() {cerr << endl;}
template<typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cerr << " " << to_string(H);
    debug_out(T...);
}

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

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

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    ll n,q; cin >> n >> q;
    atcoder::dsu uf(n);
    rep(i,0,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:7:9: fatal error: atcoder/all: No such file or directory
    7 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include<bits/stdc++.h>
#include<atcoder/all>

using namespace std;
#define rep(i,s,t) for(ll i = (ll)(s); i < (ll)(t); i++)
#define rrep(i,s,t) for(ll i = (ll)(s-1);(ll)(t) <= i; i--)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> Pll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<vvl> vvvl;
constexpr ll INF = numeric_limits<ll>::max()/4;
constexpr ll n_max = 2e5+10;
#define int ll

template <typename A, typename B>
string to_string(pair<A, B> p);
string to_string(const string &s) {return '"' + s + '"';}
string to_string(const char *c) {return to_string((string) c);}
string to_string(bool b) {return (b ? "true" : "false");}
template <size_t N>
string to_string(bitset<N> v){
    string res = "";
    for(size_t i = 0; i < N; i++) res += static_cast<char>('0' + v[i]);
    return res;
}
template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for(const auto &x : v) {
        if(!first) res += ", ";
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p){return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";}

void debug_out() {cerr << endl;}
template<typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cerr << " " << to_string(H);
    debug_out(T...);
}

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

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

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    ll n,q; cin >> n >> q;
    atcoder::dsu uf(n);
    rep(i,0,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:5:9: fatal error: atcoder/all: No such file or directory
    5 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include <bits/stdc++.h>
#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:3:9: fatal error: atcoder/all: No such file or directory
    3 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.