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

#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#include <iomanip>
#include <limits>
#include <list>
#include <queue>
#include <tuple>
#include <map>
#include <stack>
#include <set>
#include <bitset>
#include <functional>
#include <cassert>
#include <atcoder/all>
using namespace std;
#define fast_io ios_base::sync_with_stdio (false) ; cin.tie(0) ; cout.tie(0) ;
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define MOD (long long int)(1e9+7)
#define INF (int)(1e9)
#define LINF (long long int)(1e18)
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
#define all(v) v.begin(), v.end()
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;

ll mpow(ll a, ll b){
  if(b==0) return 1;
  else if(b%2==0){ll memo = mpow(a,b/2); return memo*memo%MOD;}
  else return mpow(a,b-1) * a % MOD;
}
ll lpow(ll a, ll b){
  if(b==0) return 1;
  else if(b%2==0){ll memo = lpow(a,b/2); return memo*memo;}
  else return lpow(a,b-1) * a;
}
ll gcd(ll a, ll b){
  if(b==0) return a;
  else return gcd(b, a%b);
}
vector<ll> kaijo_memo;
ll kaijo(ll n){
  if(kaijo_memo.size() > n) return kaijo_memo[n];
  if(kaijo_memo.size() == 0) kaijo_memo.push_back(1);
  while(kaijo_memo.size() <= n) kaijo_memo.push_back(kaijo_memo[kaijo_memo.size()-1] * kaijo_memo.size() % MOD);
  return kaijo_memo[n];
}
vector<ll> gyaku_kaijo_memo;
ll gyaku_kaijo(ll n){
  if(gyaku_kaijo_memo.size() > n) return gyaku_kaijo_memo[n];
  if(gyaku_kaijo_memo.size() == 0) gyaku_kaijo_memo.push_back(1);
  while(gyaku_kaijo_memo.size() <= n) gyaku_kaijo_memo.push_back(gyaku_kaijo_memo[gyaku_kaijo_memo.size()-1] * mpow(gyaku_kaijo_memo.size(), MOD-2) % MOD);
  return gyaku_kaijo_memo[n];
}

ll nCr(ll n, ll r){
  if(n == r) return 1;//0個の丸と-1個の棒みたいな時に時に効く？不安.
  if(n < r || r < 0) return 0;
  ll ret = 1;
  if(n <= 1e7){
    ret *= kaijo(n); ret %= MOD;
    ret *= gyaku_kaijo(r); ret %= MOD;
    ret *= gyaku_kaijo(n-r); ret %= MOD;
  }else{
    rep(i,r){
      ret *= n-i; ret %= MOD;
      ret *= mpow(r-i, MOD-2); ret %= MOD;
    }
  }
  return ret;
}

vector<ll> yakusu(ll n){
  vector<ll> ret;
  for(ll p = 1; p*p <= n; p++){
    if(n%p == 0){
      ret.push_back(p);
      if(p*p != n){
        ret.push_back(n/p);
      }
    }
  }
  sort(all(ret));
  return ret;
}

int main(void){
  fast_io
  cout<<fixed<<setprecision(15);

  int n,m;
  cin>>n>>m;
  ssc_graph G(n);
  rep(i,m){
    int a,b;cin>>a>>b;
    G.add_edge(a,b);
  }
  auto result = G.scc();
  cout<<result.size()<<endl;
  rep(i,result.size()){
    int num = result[i].size();
    auto row = result[i];
    cout<<num<<" ";
    rep(j,num){
      cout<<row[j]<<" ";
    }
    cout<<endl;
  }
  return 0;
}

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

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>
#include <cstring>
#include <cassert>
#include <atcoder/scc>


using namespace std;
using namespace atcoder;

#define SZ(x) (int)(x.size())
#define REP(i, n) for(int i=0;i<n;++i)
#define FOR(i, a, b) for(int i=a;i<b;++i)
#define RREP(i, n) for(int i=n-1;i>=0;--i)
#define RFOR(i, a, b) for(int i=b-1;i>=a;--i)

#define all(x) begin(x),end(x)
#define dump(x) cerr<<#x<<" = "<<(x)<<endl
#define debug(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<< endl;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<int, int>;
const double eps = 1e-8;
const ll MOD = 1000000007;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;

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

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


template<typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> p) {
    os << p.first << ":" << p.second;
    return os;
}

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    os << "[";
    REP(i, SZ(v)) {
        if (i) os << ", ";
        os << v[i];
    }
    return os << "]";
}

template<class T1, class T2>
ostream &operator<<(ostream &os, const map<T1, T2> &mp) {
    os << "[";
    for (auto it = mp.begin(); it != mp.end(); ++it) {
        if (it != mp.begin()) {
            os << ", ";
        }
        os << *it;
    }
    return os << "]";
}

// edit


void solve() {
    int N, M;
    cin >> N >> M;
    scc_graph sG(N);
    for (int i = 0; i < M; ++i) {
        int a, b;
        cin >> a >> b;
        sG.add_edge(a, b);
    }
    auto scc = sG.scc();
    cout << scc.size() << endl;
    for (int i = 0; i < scc.size(); ++i) {
        cout << scc[i].size() << ' ';
        for (auto e : scc[i]) {
            cout << e << " ";
        }
        cout << endl;
    }

}


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
//    std::ifstream in("input.txt");
//    std::cin.rdbuf(in.rdbuf());

    solve();


    return 0;
}


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

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

int main() {
	int N, M;
	cin >> N >> M;
	scc_graph graph(N);
	for (int i = 0; i < M; i++) {
		int a, b;
		cin >> a >> b;
		graph.add_edge(a, b);
	}
	auto ans = graph.scc();
	cout << ans.size() << endl;
	for (auto v : ans) {
		cout << v.size() << " ";
		for (int u : v) cout << u << " ";
		cout << endl;
	}
}


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

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

int main() {
    cin.tie(0);ios::sync_with_stdio(false);
    int N,M; cin >> N >> M;
	atcoder::scc_graph scc(N);
    while(M--) {
        int u,v; cin >> u >> v;
        scc.add_edge(u,v);
    }
    auto vv=scc.scc();
    cout << vv.size() << "\n";
    for(auto& v:vv) {
        cout << v.size();
        for(auto& e:v) cout << " " << e;
        cout << "\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++

// -----------------------------------
// author   : MatsuTaku
// country  : Japan
// created  : 09/08/20 03:55:25
// -----------------------------------

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

using namespace std;
using ll = long long;

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

  int n,m; cin>>n>>m;
  atcoder::scc_graph G(n);
  for (int i = 0; i < m; i++) {
    int a,b; cin>>a>>b;
    G.add_edge(a, b);
  }
  auto res = G.scc();
  cout << res.size() << endl;
  for (auto& S : res) {
    vector<int> path{S[0]};
    set<int> vis{S[0]};
    int s = S[0];
    do {
      for (auto t : G.)
    } while (s != S[0]);
  }

  return 0;
}


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

#ifndef ATCODER_INTERNAL_SCC_HPP
#define ATCODER_INTERNAL_SCC_HPP 1

#include <algorithm>
#include <utility>
#include <vector>

namespace atcoder {
namespace internal {

template <class E> struct csr {
    std::vector<int> start;
    std::vector<E> elist;
    csr(int n, const std::vector<std::pair<int, E>>& edges)
        : start(n + 1), elist(edges.size()) {
        for (auto e : edges) {
            start[e.first + 1]++;
        }
        for (int i = 1; i <= n; i++) {
            start[i] += start[i - 1];
        }
        auto counter = start;
        for (auto e : edges) {
            elist[counter[e.first]++] = e.second;
        }
    }
};

// Reference:
// R. Tarjan,
// Depth-First Search and Linear Graph Algorithms
struct scc_graph {
  public:
    scc_graph(int n) : _n(n) {}

    int num_vertices() { return _n; }

    void add_edge(int from, int to) { edges.push_back({from, {to}}); }

    // @return pair of (# of scc, scc id)
    std::pair<int, std::vector<int>> scc_ids() {
        auto g = csr<edge>(_n, edges);
        int now_ord = 0, group_num = 0;
        std::vector<int> visited, low(_n), ord(_n, -1), ids(_n);
        visited.reserve(_n);
        auto dfs = [&](auto self, int v) -> void {
            low[v] = ord[v] = now_ord++;
            visited.push_back(v);
            for (int i = g.start[v]; i < g.start[v + 1]; i++) {
                auto to = g.elist[i].to;
                if (ord[to] == -1) {
                    self(self, to);
                    low[v] = std::min(low[v], low[to]);
                } else {
                    low[v] = std::min(low[v], ord[to]);
                }
            }
            if (low[v] == ord[v]) {
                while (true) {
                    int u = visited.back();
                    visited.pop_back();
                    ord[u] = _n;
                    ids[u] = group_num;
                    if (u == v) break;
                }
                group_num++;
            }
        };
        for (int i = 0; i < _n; i++) {
            if (ord[i] == -1) dfs(dfs, i);
        }
        for (auto& x : ids) {
            x = group_num - 1 - x;
        }
        return {group_num, ids};
    }

    std::vector<std::vector<int>> scc() {
        auto ids = scc_ids();
        int group_num = ids.first;
        std::vector<int> counts(group_num);
        for (auto x : ids.second) counts[x]++;
        std::vector<std::vector<int>> groups(ids.first);
        for (int i = 0; i < group_num; i++) {
            groups[i].reserve(counts[i]);
        }
        for (int i = 0; i < _n; i++) {
            groups[ids.second[i]].push_back(i);
        }
        return groups;
    }

  private:
    int _n;
    struct edge {
        int to;
    };
    std::vector<std::pair<int, edge>> edges;
};

}  // namespace internal

}  // namespace atcoder

#endif  // ATCODER_INTERNAL_SCC_HPP


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#define _GLIBCXX_DEBUG
#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


#include "library/graph/Graph.hpp"

int N, M;
Graph<int> G;
Graph<int> H;
vi id[202020];

void solve() {
    cout << G.Gbuild_SCC() << endl;
    H.build(G.SCC_T);

    for (int i = 0; i < N; i++) {
        id[G.SCC(i)].emplace_back(i);
    }

    auto V = H.TopologicalSort();
    for (auto& x : V) {
        cout << id[x].size() << " ";
        for (auto& i : id[x])
            cout << i << " ";
        cout << endl;
    }
}

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

    cin >> N >> M;
    G.resize(N);
    for (int i = 0; i < M; i++) {
        int a, b;
        cin >> a >> b;
        G.add_edge_directed(a, b);
    }

    solve();
    return 0;
}


Compiler output:
a.cc:81:10: fatal error: library/graph/Graph.hpp: No such file or directory
   81 | #include "library/graph/Graph.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++



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

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

/*
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
void Add(ll &pos,ll val){pos=mod(pos+val);}
void mod_print(ll k){
    ll P=50000;
    rep(y,1,P){
        ll x=mod(y*k);
        
        if(abs(x)<=P||x+P>=i_7){
            if(x+P>=i_7){
                x-=i_7;
            }
            cout<<x<<"/"<<y<<endl;
            //cout<<setprecision(5)<<(dd)x/(dd)y;
            return;
        }
    }
    cout<<"nun"<<endl;
}
*/

#include "boost/multiprecision/cpp_int.hpp"
#include "boost/multiprecision/cpp_dec_float.hpp"
namespace mp = boost::multiprecision;
typedef mp::cpp_int LL;
typedef mp::number<mp::cpp_dec_float<1024>> DD;// 仮数部が1024ビットの浮動小数点数型(TLEしたら小さくする)

typedef long double dd;
typedef pair<ll,ll> l_l;
typedef pair<dd,dd> d_d;
ll inf=(ll)1E16;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define rrep(i,r,l) for(ll i=r;i>=l;i--)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll &pos,ll val){pos=max(pos,val);}//Max(dp[n],dp[n-1]);
void Min(ll &pos,ll val){pos=min(pos,val);}
dd EPS=1E-12;
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define fi first
#define se second

#define SORT(v) sort(v.begin(),v.end())
#define ERASE(v) v.erase(unique(v.begin(),v.end()),v.end())
#define POSL(v,x) (lower_bound(v.begin(),v.end(),x)-v.begin())
#define POSU(v,x) (upper_bound(v.begin(),v.end(),x)-v.begin())
template<class T,class S>
inline bool chmax(T &a, S b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}
template<class T,class S>
inline bool chmin(T &a, S b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
//#define endl "\n"  //インタラクティブで消す！！！！！！！！！！！！！！！！！！！！！
#define all(c) c.begin(),c.end()
typedef vector<ll> vl;


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

int main(){fastio
    
    ll n,m;cin>>n>>m;
    scc_graph g(n);
    while(m--){
        ll a,b;cin>>a>>b;
        g.add_edge(a,b);
    }
    auto v=g.scc();
    cout<<v.size()<<endl;
    for(auto x:v){
        cout<<x.size()<<" ";
        for(auto y:x)cout<<y<<" ";
        cout<<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 <bits/stdc++.h>
#include <atcoder/twosat>
//#include <boost/multiprecision/cpp_int.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define EPS (1e-9)
#define INF (1e17)
#define PI (acos(-1))
//const double PI = acos(-1);
//const double EPS = 1e-15;
//long long INF=(long long)1E17;
#define i_7 (long long)(1e9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
long long po(long a, long b){
    if(b==0){
        return 1;
    }
    
    long long z = po(a,b/2);
    z = mod(z*z);
    if(b%2!=0){
        z = mod(a*z);
    }
    return z;
}
 
bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=std::sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}
 
long long gcd_(long long a, long long b){
  if(a<b){
    std::swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}
 
//using namespace std;
//using namespace boost::multiprecision;
//using namespace __gnu_pbds;

int main(){
  using namespace std;
  using namespace atcoder;
  
  int n, d;
  cin>>n>>d;
  int x[n], y[n];
  REP(i, n) cin>>x[i]>>y[i];
  
  two_sat ts(2 * n);
  REP(i, n){
    ts.add_clause(i, true, i + n, true);
    ts.add_clause(i, false, i + n, false);
  }
  REP(i, n){
    for(int j = i + 1; j < n; j++){
      if(abs(x[i] - x[j]) < d) ts.add_clause(i, false, j, false);
      if(abs(x[i] - y[j]) < d) ts.add_clause(i, false, j + n, false);
      if(abs(y[i] - x[j]) < d) ts.add_clause(i + n, false, j, false);
      if(abs(y[i] - y[j]) < d) ts.add_clause(i + n, false, j + n, false);
    }
  }
  bool possible = ts.satisfiable();
  if(!possible){
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  vector<bool> ans = ts.answer();
  REP(i, n){
    if(ts[i]){
      cout << x[i] << endl;
    }else{
      cout << y[i] << endl;
    }
  }    
  return 0;
}


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

#include <bits/stdc++.h>
#include <atcoder/twosat>
//#include <boost/multiprecision/cpp_int.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define EPS (1e-9)
#define INF (1e17)
#define PI (acos(-1))
//const double PI = acos(-1);
//const double EPS = 1e-15;
//long long INF=(long long)1E17;
#define i_7 (long long)(1e9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
long long po(long a, long b){
    if(b==0){
        return 1;
    }
    
    long long z = po(a,b/2);
    z = mod(z*z);
    if(b%2!=0){
        z = mod(a*z);
    }
    return z;
}
 
bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=std::sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}
 
long long gcd_(long long a, long long b){
  if(a<b){
    std::swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}
 
//using namespace std;
//using namespace boost::multiprecision;
//using namespace __gnu_pbds;

int main(){
  using namespace std;
  using namespace atcoder;
  
  int n, d;
  cin>>n>>d;
  int x[n], y[n];
  REP(i, n) cin>>x[i]>>y[i];
  
  two_sat ts(2 * n);
  REP(i, n){
    ts.add_clause(i, true, j, true);
    ts.add_clause(i, false, j, false);
  }
  REP(i, n){
    for(int j = i + 1; j < n; j++){
      if(abs(x[i] - x[j]) < d) ts.add_clause(i, false, j, false);
      if(abs(x[i] - y[j]) < d) ts.add_clause(i, false, j + n, false);
      if(abs(y[i] - x[j]) < d) ts.add_clause(i + n, false, j, false);
      if(abs(y[i] - y[j]) < d) ts.add_clause(i + n, false, j + n, false);
    }
  }
  bool possible = ts.satisfiable();
  if(!possible){
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  vector<bool> ans = ts.answer();
  REP(i, n){
    if(ts[i]){
      cout << x[i] << endl;
    }else{
      cout << y[i] << endl;
    }
  }    
  return 0;
}


Compiler output:
a.cc:2:10: fatal error: atcoder/twosat: No such file or directory
    2 | #include <atcoder/twosat>
      |          ^~~~~~~~~~~~~~~~
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++)
using ll = long long;
using P = pair<int, int>;

#define INF 1001001001
#define MAX 1e18

const int mod = 998244353;

int main() {
  int n, d;
  cin >> n >> d;
  vector<int> x(n), y(n);
  rep(i,n) cin >> x[i] >> y[i];

  two_sat ts(n);
  rep(i,n) for (int j = i+1; j < n; j++) {
    if (abs(x[i]-x[j]) < d) ts.add_clause(i,false,j,false);
    if (abs(x[i]-y[j]) < d) ts.add_clause(i,false,j,true);
    if (abs(y[i]-x[j]) < d) ts.add_clause(i,true,j,false);
    if (abs(y[i]-y[j]) < d) ts.add_clause(i,true,j,true);
  }
  if (!ts.satisfiable()) {
    cout << "No" << endl;
    return 0;
  }
  vector<bool> res = ts.answer();
  cout << "Yes" << endl;
  rep(i,n) cout << (res[i]?x[i]:y[i]) << 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>

typedef long long ll;
typedef std::pair<ll, ll> P;

constexpr ll INF = 1e15;
constexpr ll mod = 1e9+7;

#define rep(i,n) for(int i = 0; i < int(n); i++)
using namespace std;

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

int main() {
    ll n, d;
    cin >> n >> d;
    vector<P> ps(n);
    rep(i, n) {
        cin >> ps[i].first >> ps[i].second;
    }
    auto graph = atcoder::two_sat(n);
    rep(i, n) {
        rep(j, n) {
            if (i == j) continue;
            //条件を満たさない場合にノードをつなぐ
            if (abs(ps[i].first - ps[j].first) < d) {
                graph.add_clause(i, true, j, true);
            }
            if (abs(ps[i].first - ps[j].second) < d) {
                graph.add_clause(i, true, j, false);
            }
            if (abs(ps[i].second - ps[j].first) < d) {
                graph.add_clause(i, false, j, true);
            }
            if (abs(ps[i].second - ps[j].second) < d) {
                graph.add_clause(i, false, j, false);
            }
        }
    }
    if (graph.satisfiable()) {
        cout << "Yes" << endl;
        auto ans = graph.answer();
        rep(i, n) {
            if (ans[i]) {
                cout << ps[i].first << endl;
            }
            else {
                cout << ps[i].second << endl;
            }
        }
        return 0;
    }
    cout << "No" << 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;
using namespace atcoder;
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;

#define REP(i, init, n) for(int i = (int)(init); i < (int)(n); i++)

#define vi vector<int>
#define vl vector<long>
#define vvi vector<vector<int>>
#define vvl vector<vector<long>>
#define pint pair<int, int>
#define plong pair<long, long>

int main() {
    int N, D;
    cin>> N >> D;
    vector<plong> P(N); 
    two_sat ts(N);
    REP(i, 0, N){
        int x, y;
        cin >> x >> y;
        P[i] = {x, y};
    }
    REP(i, 0, N){
        REP(j, i + 1, N){
            if(abs(P[i].first - P[j].first) < D){
                ts.add_clause(i, false, j, false);
            }
            if(abs(P[i].first - P[j].second) < D){
                ts.add_clause(i, false, j, true);
            }
            if(abs(P[i].second - P[j].first) < D){
                ts.add_clause(i, true, j, false);  
            }
            if(abs(P[i].second - P[j].second) < D){
                ts.add_clause(i, true, j, true);    
            }
        }
    }
    if(!ts.satisfiable()){
        cout << "No" << endl;
        return 0;
    }

    cout << "Yes" << endl;
    vector<bool> ans = ts.answer();
    REP(i, 0, N){
        if(ans[i]){
            cout << P[i].first << endl;
        }else{
            cout << P[i].second << 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"
using namespace std;
using     ll=long long;
using    vll=vector<   ll>;
using   vvll=vector<  vll>;
using  vvvll=vector< vvll>;
using vvvvll=vector<vvvll>;
constexpr ll INF = 1LL << 60;
struct Fast{ Fast(){ cin.tie(0); ios::sync_with_stdio(false); cout<<fixed<<setprecision(numeric_limits<double>::max_digits10); } } fast;
#define REPS(i, S, E) for (ll i = (S); i <= (E); i++)
#define REP(i, N) REPS(i, 0, (N)-1)
#define DEPS(i, S, E) for (ll i = (E); i >= (S); i--)
#define DEP(i, N) DEPS(i, 0, (N)-1)
#define rep(i, S, E)  for (ll i = (S); i <= (E); i++)
#define dep(i, E, S)  for (ll i = (E); i >= (S); i--)
#define each(e, v) for (auto&& e : v)
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
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; }
template<class T> inline T MaxE(vector<T>&v,ll S,ll E){ T m=v[S]; rep(i,S,E)chmax(m,v[i]); return m; }
template<class T> inline T MinE(vector<T>&v,ll S,ll E){ T m=v[S]; rep(i,S,E)chmin(m,v[i]); return m; }
template<class T> inline T MaxE(vector<T> &v) { return MaxE(v,0,(ll)v.size()-1); }
template<class T> inline T MinE(vector<T> &v) { return MinE(v,0,(ll)v.size()-1); }
template<class T> inline T Sum(vector<T> &v,ll S,ll E){ T s=T(); rep(i,S,E)s+=v[i]; return s; }
template<class T> inline T Sum(vector<T> &v) { return Sum(v,0,v.size()-1); }
template<class T> inline ll sz(T &v){ return (ll)v.size(); }
inline ll CEIL(ll a,ll b){ return (a<0) ? -(-a/b) : (a+b-1)/b; }
inline ll FLOOR(ll a,ll b){ return -CEIL(-a,b); }

#if 1
#include <atcoder/all>
#endif
using namespace atcoder;


void solve()
{
	ll n,d;  cin >> n >> d;
	vector<pair<ll,ll>> xy(n);
	rep(i,0,n-1){ ll x; ll y; cin>>x>>y; xy[i]={x,y}; }

	two_sat ts(n);

	rep(i,0,n-1){
		rep(j,i+1,n-1){
			ll xi,yi;  tie(xi,yi) = xy[i];
			ll xj,yj;  tie(xj,yj) = xy[j];

			if (abs(xi-xj)<d){
				ts.add_clause(i,false,j,false);
			}
			if (abs(yi-yj)<d){
				ts.add_clause(i,true,j,true);
			}
			if (abs(yi-xj)<d){
				ts.add_clause(i,true,j,false);
			}
			if (abs(xi-yj)<d){
				ts.add_clause(i,false,j,true);
			}
		}
	}
	if (!ts.satisfiable()){
		cout << "No" << '\n';return;
	}
	cout << "Yes" << '\n';
	auto ans=ts.answer();
	rep(i,0,n-1){
		ll xi,yi;  tie(xi,yi) = xy[i];
		if (ans[i]){
			cout << xi << '\n';
		}
		else{
			cout << yi << '\n';
		}
	}
}


int main(){
#if 1
	solve();
#else
	ll t;  cin >> t;
	rep(i, 0, t-1){
		solve();
	}
#endif
	return 0;
}


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

#include <iostream>
#include <vector>
#include <atcoder/twosat>

namespace ac = atcoder;

void solve() {
    int n, d;
    std::cin >> n >> d;

    std::vector<int> xs(n * 2);
    for (auto& x : xs) std::cin >> x;

    ac::two_sat ts(n * 2);
    for (int i = 0; i < n * 2; i += 2) {
        ts.add_clause(i, true, i + 1, true);
        ts.add_clause(i, false, i + 1, false);
    }

    for (int i = 0; i < n * 2; ++i) {
        for (int j = 0; j < i; ++j) {
            if (std::abs(xs[i] - xs[j]) < d) {
                ts.add_clause(i, false, j, false);
            }
        }
    }

    if (!ts.satisfiable()) {
        std::cout << "No\n";
        return;
    }

    std::cout << "Yes\n";
    auto ans = ts.answer();
    for (int i = 0; i < n * 2; ++i) {
        if (ans[i]) std::cout << xs[i] << "\n";
    }
}

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

    solve();

    return 0;
}


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

#include <atcoder/twosat>
#include <iostream>
#include <vector>

using namespace std;
using namespace atcoder;

int main() {
    int n, d;
    cin >> n >> d;
    vector<int> x(n), y(n);
    for (int i = 0; i < n; i++) {
        cin >> x[i] >> y[i];
    }

    // ts[i] = (i-th flag is located on x[i])
    two_sat ts(n);

    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            if (abs(x[i] - x[j]) < d) {
                // cannot use both of x[i] and x[j]
                ts.add_clause(i, false, j, false);
            }
            if (abs(x[i] - y[j]) < d) {
                ts.add_clause(i, false, j, true);
            }
            if (abs(y[i] - x[j]) < d) {
                ts.add_clause(i, true, j, false);
            }
            if (abs(y[i] - y[j]) < d) {
                ts.add_clause(i, true, j, true);
            }
        }
    }

    if (!ts.satisfiable()) {
        cout << "No" << endl;
        return 0;
    }

    cout << "Yes" << endl;
    auto answer = ts.answer();
    for (int i = 0; i < n; i++) {
        if (answer[i])
            cout << x[i] << endl;
        else
            cout << y[i] << endl;
    }

    return 0;
}
#include <atcoder/twosat>
#include <iostream>
#include <vector>

using namespace std;
using namespace atcoder;

int main() {
    int n, d;
    cin >> n >> d;
    vector<int> x(n), y(n);
    for (int i = 0; i < n; i++) {
        cin >> x[i] >> y[i];
    }

    // ts[i] = (i-th flag is located on x[i])
    two_sat ts(n);

    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            if (abs(x[i] - x[j]) < d) {
                // cannot use both of x[i] and x[j]
                ts.add_clause(i, false, j, false);
            }
            if (abs(x[i] - y[j]) < d) {
                ts.add_clause(i, true, j, false);
            }
            if (abs(y[i] - x[j]) < d) {
                ts.add_clause(i, true, j, false);
            }
            if (abs(y[i] - y[j]) < d) {
                ts.add_clause(i, false, j, false);
            }
        }
    }

    if (!ts.satisfiable()) {
        cout << "No" << endl;
        return 0;
    }

    cout << "Yes" << endl;
    auto answer = ts.answer();
    for (int i = 0; i < n; i++) {
        if (answer[i])
            cout << x[i] << endl;
        else
            cout << y[i] << endl;
    }

    return 0;
}


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

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

using namespace std;
using ll = long long;


int main()
{
	int n, d; cin >> n >> d;
	vector<pair<int,int>> a(n);
	atcoder::two_sat ts(n);
	for(int i = 0; i < n; i++)cin >> a[i].first >> a[i].second;

	for(int i = 0; i < n; i++) {
		for(int j = i + 1; j < n; j++) {

			int dx = a[i].first;
			int dy = a[i].second;
			if(abs(dx - a[j].first) < d)  ts.add_clause(i, false, j, false);
			if(abs(dx - a[j].second) < d) ts.add_clause(i, false, j, true);
			if(abs(dy - a[i].first) < d)  ts.add_clause(i, true, j, false);
			if(abs(dy - a[i].second) < d) ts.add_clause(i, true, j, true);

		}
	}

	bool sat = ts.satisfiable();
	cout << (sat ? "Yes" : "No") << endl;
	if(sat) {
		auto v = ts.answer();
		for(int i = 0; i < n; i++) {
			cout << (v[i] ? a[i].first : a[i].second) << endl;
		}

	}

}

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

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

//template
#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
template<typename T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
//end

#include <atcoder/twosat>
//python3 ac-library/expander.py sol.cpp

int main(){
   int n,d; cin>>n>>d;
   vector<int> x(n),y(n);
   rep(i,0,n)cin>>x[i]>>y[i];
   atcoder::two_sat g(n*2);
   rep(i,0,n)g.add_clause(i,1,i+n,1);
   rep(i,0,n)rep(j,0,n)if(i!=j){
      if(abs(x[i]-x[j])<d){
         g.add_clause(i,0,j,0);
      }
      if(abs(y[j]-y[i])<d){
         g.add_clause(j+n,0,i+n,0);
      }
      if(abs(x[j]-y[i])<d){
         g.add_clause(j,0,i+n,0);
      }
      if(abs(y[j]-x[i])<d){
         g.add_clause(j+n,0,i,0);
      }
   }
   bool can=g.satisfiable();
   if(can){
      puts("Yes");
      auto res=g.answer();
      rep(i,0,n){
         if(res[i])cout<<x[i]<<endl;
         else cout<<y[i]<<endl;
      }
   }
   else puts("No");
   return 0;
}

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

//#define _GLIBCXX_DEBUG
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
#define rep(i,n) for (int i = 0;i < (int)(n);i++)
using ll = long long;
const ll MOD=1000000007;
//const ll MOD=998244353;
const long long INF = 1LL << 60;
const double pi=acos(-1.0);
int dx[9] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
int dy[9] = {0, 1, 0, -1, 1, -1, -1, 1, 0};

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()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  // cout << fixed << setprecision(15);
  
  ll N,D; cin>>N>>D;
  vector<ll> x(N),y(N); rep(i,N) cin>>x[i]>>y[i];
  
  two_sat ts(N);
  rep(i,N){
    for(int j=i+1;j<N;j++){
      if(abs(x[i]-x[j])<D) ts.add_clause(i,0,j,0);
      if(abs(y[i]-y[j])<D) ts.add_clause(i,1,j,1);
      if(abs(x[i]-y[j])<D) ts.add_clause(i,0,j,1);
      if(abs(y[i]-x[j])<D) ts.add_clause(i,1,j,0);
    }
  }
  
  if(!ts.satisfiable()) {cout<<"No"<<'\n'; return 0;}
  else cout<<"Yes"<<'\n';
  
  auto ans_vec=ts.answer();
  
  rep(i,N) cout<<(ans_vec[i]?x[i]:y[i])<<'\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++

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <atcoder/all>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pll pair<ll,ll>
#define pii pair<int,int>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define endl '\n'
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,x) distance(c.begin(),lower_bound(all(c),x))
#define ub(c,x) distance(c.begin(),upper_bound(all(c),x))

using namespace std;
using namespace atcoder;

int main(){
    int n,d;
    cin >> n >> d;
    two_sat ts(n);
    vector<int> x(n),y(n);
    rep(i,n){
        cin >> x[i] >> y[i];
    }
    rep(i,n){
        for(int j=i+1;j<n;j++){
            if(abs(x[i]-x[j])<d){
                ts.add_clause(i,false,j,false);
            }
            if(abs(y[i]-y[j]<d)){
                ts.add_clause(i,true,j,true);
            }
            if(abs(x[i]-y[j])<d){
                ts.add_clause(i,true,j,false);
            }
            if(abs(y[i]-x[j])<d){
                ts.add_clause(i,false,j,true);
            }
        }
    }
    if(!ts.satisfied()){
        cout << "No" << endl;
        return 0;
    }
    cout << "Yes" << endl;
    auto ans=ts.answer();
    rep(i,n){
        if(ans[i]) cout << x[i] << endl;
        else cout << y[i] << endl;
    }
    return 0;
}

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/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, d;
    cin >> n >> d;
    vector<P> v(n);
    rep(i, n) cin >> v[i].first >> v[i].second;
    two_sat g(n);
    rep(i, n) rep(j, i) {
        rep(ii, 2) {
            rep(jj, 2) {
                if (abs(v[i].first-v[j].first)<d) {
                    g.add_clause(i, ii==0, j, jj==0);
                }
                swap(v[j].first, v[j].second);
            }
            swap(v[i].first, v[i].second);
        }
    }
    bool ok = g.satisfiable();
    if (!ok) {
        pr("No");
        return 0;
    }
    pr("Yes");
    auto ans = g.answer();

    rep(i, n) {
        if (ans[i]) pr(v[i].first);
        else pr(v[i].second);
    }
    
    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 rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;

int main() {
	int n, d;
	cin >> n >> d;
	vector a(n, vector(2, 0));
	rep(i, n) rep(j, 2) cin >> a[i][j];

	atcoder::two_sat t(n);
	rep(i, n) for (int j = i + 1; j < n; ++j) rep(k, 4) {
		if (abs(a[i][k >> 1] - a[j][k & 1]) < d) t.add_clause(i, k >> 1, j, k & 1);
	}
	if (t.satisfiable()) {
		puts("Yes");
		auto ans = t.answer();
		rep(i, n) cout << a[i][!ans[i]] << endl;
	} else {
		puts("No");
	}
}

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 vec vector<ll>
#define mat vector<vector<ll>>

using namespace std;
using namespace atcoder;

const ll mod=1000000007;
const ll inf=LONG_LONG_MAX;
ll dx4[4]={1,0,-1,0};
ll dy4[4]={0,-1,0,1};
ll dx8[8]={1,0,-1,1,-1,1,0,-1};
ll dy8[8]={1,1,1,0,0,-1,-1,-1};

int main(){

  ll n,d;
  cin >> n >> d;
  
  vec x(n),y(n);
  for(ll i=0;i<n;i++)cin >> x[i] >> y[i];

  two_sat ts(n);

  for(ll i=0;i<n;i++){
    for(ll j=i+1;j<n;j++){
      if (abs(x[i] - x[j]) < d) {
        // cannot use both of x[i] and x[j]
        ts.add_clause(i, false, j, false);
      }
      if (abs(x[i] - y[j]) < d) {
        ts.add_clause(i, false, j, true);
      }
      if (abs(y[i] - x[j]) < d) {
        ts.add_clause(i, true, j, false);
      }
      if (abs(y[i] - y[j]) < d) {
        ts.add_clause(i, true, j, true);      
    }
  }

  if (!ts.satisfiable()) {
    cout << "No" << endl;
    return 0;
  }

  cout << "Yes" << endl;
  auto answer = ts.answer();
  for (int i = 0; i < n; i++) {
    if (answer[i])
      cout << x[i] << endl;
    else
      cout << y[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>
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define rrep(i, n) for (int i = (int)n-1; i >= 0; --i)
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, d;
    cin >> n >> d;
    auto x = make_vec<int>({n, 2});
    rep(i, n) cin >> x[i][0] >> x[i][1];
    two_sat ts(n);

    auto ng = [&](int a, int b) { return abs(a - b) < d; };
    rep(i, n) for (int j = i+1; j < n; ++j) {
        rep(k, 2) rep(l, 2) {
            if (ng(x[i][k], x[j][l])) {
                ts.add_clause(i, 1-k, j, 1-l);
            }
        }
    }
    bool ans = ts.satisfiable();
    if (ans) {
        cout << "Yes\n";
        auto v = ts.answer();
        rep(i, n) cout << x[i][v[i]] << '\n';
    } else {
        cout << "No\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;
using ll = long long;
using mint = modint;
const int mod = 1000000007;
const double PI = acos(-1);

int main()
{
	string s;
	cin >> s;
	int n = s.size();
	vector<int> sa = suffix_array(s);
	ll ans = 1LL * n * (n + 1) / 2;
	for (const auto& item : lcp_array(s, sa)) ans -= item;
	cout << ans << endl;
}


Compiler output:
a.cc:4:17: error: 'atcoder' is not a namespace-name
    4 | using namespace atcoder;
      |                 ^~~~~~~
a.cc:6:14: error: 'modint' does not name a type; did you mean 'mode_t'?
    6 | using mint = modint;
      |              ^~~~~~
      |              mode_t
a.cc: In function 'int main()':
a.cc:15:26: error: 'suffix_array' was not declared in this scope
   15 |         vector<int> sa = suffix_array(s);
      |                          ^~~~~~~~~~~~
a.cc:17:33: error: 'lcp_array' was not declared in this scope
   17 |         for (const auto& item : lcp_array(s, sa)) ans -= item;
      |                                 ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using mint = modint;
const int mod = 1000000007;
const double PI = acos(-1);

int main()
{
	string s;
	cin >> s;
	int n = s.size();
	vector<int> sa = suffix_array(s);
	ll ans = 1LL * n * (n + 1) / 2;
	for (const auto& item : lcp_array(s, sa)) ans -= item;
	cout << ans << 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;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
inline ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b)*b; }
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<class T> ostream& operator << (ostream& out,const vector<T>& V){ for(int i = 0; i < V.size(); i++){ out << V[i]; if(i!=V.size()-1) out << " ";} return out; }
template<class T> ostream& operator << (ostream& out,const vector<vector<T> >& Mat){ for(int i = 0; i < Mat.size(); i++) { if(i != 0) out << endl; out << Mat[i];} return out; }
template<class S,class T> ostream& operator << (ostream& out,const map<S,T>& mp){ out << "{ "; for(auto it = mp.begin(); it != mp.end(); it++){ out << it->first << ":" << it->second; if(mp.size()-1 != distance(mp.begin(),it)) out << ", "; } out << " }"; return out; }
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);}
/*
 <url:>
 問題文============================================================
 =================================================================
 解説=============================================================
 ================================================================
 */

using namespace atcoder;
int main() {
    static char buf[500'001];
    scanf("%s", buf);
    string s = buf;
    vector<int> sa = suffix_array(s);
    long long answer = 1LL * s.size() * (s.size() + 1) / 2;
    for (auto x : lcp_array(s, sa)) {
        answer -= x;
    }
    printf("%lld\n", answer);
    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 <string>
#include "string.hpp"
using namespace std;
using namespace atcoder;
typedef long long ll;

int main()
{
    string s;
    cin >> s;
    int n = s.size();
    vector<int> sa = suffix_array(s);
    vector<int> la = lcp_array(s, sa);
    ll ans = n - sa[0];
    for(int i = 1; i < n; i++){
        ans += n - sa[i] - la[i - 1];
    }
    cout << ans << endl;
}


Compiler output:
a.cc:3:10: fatal error: string.hpp: No such file or directory
    3 | #include "string.hpp"
      |          ^~~~~~~~~~~~
compilation terminated.