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

#include<atcoder/dsu.hpp>
#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long int;
using namespace atcoder;
template<typename T>
ostream& operator+(ostream& out, const vector<T> &vec){
    for(const auto &x : vec){
        out<<x<<" ";
    }
    out<<"\n";
    return out;
}
template<typename T>
ostream& operator*(ostream& out, const vector<T> &vec){
    for(const auto &x : vec){
        out+x;
    }
    return out;
}
template<typename T>
istream& operator>>(istream& in, vector<T> &vec){
    for(auto &x : vec){
        in>>x;
    }
    return in;
}
void solve(){
    int n;
    cin>>n;
    vector<int> x(n), y(n);
    for(int i=0;i<n;i++){
        cin>>x[i]>>y[i];
        --x[i];--y[i];
    }
    dsu comp(n);
    vector<int> order(n);
    iota(order.begin(), order.end(), 0);
    sort(order.begin(), order.end(), [&](int l,int r){
        return x[l] < x[r];
    });
    set<int> roots;
    for(const auto &i : order){
        roots.insert(y[i]);
        vector<int> toremove = {y[i]};
        for(const auto &x : roots){
            if(x < y[i]){
                toremove.pb(x);
            }
            else{
                break;
            }
        }
        int left = *min_element(toremove.begin(), toremove.end());
        for(const auto &x : toremove){
            comp.merge(left, x);
            if(x!=left){
                roots.erase(x);
            }
        }
    }
    for(int i=0;i<n;i++){
        cout<<comp.size(y[i])<<"\n";
    }
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
}

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

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

int main() {
	int n;
    cin >> n;
    map<pair<int, int>, int> index;
    set<pair<int, int>> nodes;
    for (int i = 0; i < n; ++i) {
        int x, y;
        cin >> x >> y;
        x--, y--;
        nodes.emplace(x, y);
        index[make_pair(x, y)] = i;
    }

    dsu uf(n);
    while(nodes.size()) {
        auto p = *nodes.begin();
        nodes.erase(nodes.begin());
        int ci = index[p];
        int cx = p.first, cy = p.second;
        for(auto to : nodes) {
            int tx = to.first, ty = to.second;
            if((tx < cx && ty < cy) || (cx < tx && cy < ty)) {
                int ti = index[make_pair(tx, ty)];
                uf.merge(ci, ti);
                nodes.erase(nodes.find(to));
            }
        }
    }

    for (int i = 0; i < n; ++i) {
        cout << uf.size(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 <atcoder/convolution>
#include <atcoder/dsu>
#include <atcoder/fenwicktree>
#include <atcoder/lazysegtree>
#include <atcoder/math>
#include <atcoder/maxflow>
#include <atcoder/mincostflow>
#include <atcoder/modint>
#include <atcoder/scc>
#include <atcoder/segtree>
#include <atcoder/string>
#include <atcoder/twosat>
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, k, n) for (int i = k; i < (int)(n); i++)
#define repd(i, n) for (int i = n-1; i >= 0; i--)
#define rrepd(i, k, n) for (int i = n-1; i >= (int)(k); i--)
#define all(x) (x).begin(),(x).end()
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
//V,Pは大文字i,l,bは小文字
using ll = long long;
using Vi = vector<int>;
using VVi = vector<Vi>;
using Vl = vector<ll>;
using VVl = vector<Vl>;
using Vb = vector<bool>;
using VVb = vector<Vb>;
using P = pair<int,int>;
using Pll = pair<ll, ll>;
const ll mod = 1000000007;
const ll inf = 1000000000000;//10の12乗
struct UnionFind {
    //自身が親であれば、その集合に属する頂点数に-1を掛けたもの
    //そうでなければ親のid
    vector<int> r;
 
    UnionFind(int N) {
        r = vector<int>(N, -1);
    }
 
    int root(int x) {
        if (r[x] < 0) return x;
        return r[x] = root(r[x]);
    }
 
    bool unite(int x, int y) {
        x = root(x);
        y = root(y);
        if (x == y) return false;
        if (r[x] > r[y]) swap(x, y);
        r[x] += r[y];
        r[y] = x;
        return true;
    }
 
    int size(int x) {
        return -r[root(x)];
    }
};

int main() {
  ll n;
  cin >> n;
  Vi to(n),num(n);
  rep(i,n){
    int x,y;
    cin >> x >> y;
    x--;y--;
    to[x]=y;
    num[x]=i;
  }
  ll mn=n;
  UnionFind uf(n);
  rep(i,n){
    ll x=to[i];
    chmin(mn,x);
    if(mn!=n-i-1&&i!=n-1){
      uf.unite(i,i+1);
    }
  }
  Vi ans(n);
  rep(i,n){
    int x=uf.size(i);
    int y=num[i];
    ans[y]=x;
  }
  rep(i,n) cout << ans[i] << endl;
    
}

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


#include <bits/stdc++.h>
#define LL long long

using namespace std;
const int maxn = 2000005;

struct node
{
	int x, y, num;
	bool operator <(const node &b) const
	{
		return x < b.x;
	}
} c[maxn];

int n;

int f[maxn];

int lowbit(int x)
{
	return x & - x;
}

void update(int x)
{
	for (int i = x; i < maxn; i += lowbit(i))
	{
		f[i]++;
	}
}

int query(int x)
{
	int ret = 0;
	for (int i = x; i; i -=lowbit(i))
	{
		ret += f[i];
	}
	return ret;
}

int ans[maxn], put[maxn];

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin >> n;
	for (int i = 1; i <= n; i++) cin >> c[i].x >> c[i].y;
	for (int i = 1; i <= n; i++) c[i].num = i;
	sort(c + 1, c + n + 1);
	for (int i = 1; i <= n; i++)
	{
		//cout << c[i].x << " " << c[i].y << " " << c[i].num << endl;
		ans[i] = query(c[i].y - 1);
		if (c[i].x != c[i + 1].x)
		{
			for (int j = i; c[j].x == c[i].x; j--)
			{
				update(c[j].y);
			}
		}
	}
	memset(f, 0, sizeof(f));
	for (int i = n; i >= 1; i--)
	{
		ans[i] += query(maxn - (c[i].y + 1));
		if (c[i].x != c[i - 1].x)
		{
			for (int j = i; c[j].x == c[i].x; j++)
			{
				update(maxn - c[j].y);
			}
		}
	}
	for (int i = 1; i <= n; i++)
	{
		put[c[i].num] = ans[i];
	}
	for (int i = 1; i <= n; i++)
	{
		cout << put[i] + 1 << endl;
	}
	return 0;
}

Compiler output:
main.c:2:10: fatal error: bits/stdc++.h: No such file or directory
    2 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
#include <set>
#include <iomanip>
#include <queue>
#include <string>
#include <map>
#include <fstream>
#include <cassert>
#include <stack>
#include <climits>
#include <array>
#include <unordered_set>
#include <unordered_map>
#include <memory>
#include <functional>
#include <cfloat>
#include <numeric>
#include <atcoder/DSU>
struct Coordinate {
	int x, y;
};
int main() {
	int n; std::cin >> n;
	std::vector<Coordinate> coordinate(n);
	for (auto& c : coordinate) {
		std::cin >> c.x >> c.y;
	}
	atcoder::dsu uft(n);
	std::stack<std::pair<int, int>> stack;
	std::vector<int> indices(n); std::iota(indices.begin(), indices.end(), 0);
	std::sort(indices.begin(), indices.end(), [&](const int i, const int j) {return coordinate[i].x < coordinate[j].x; });
	for (const auto i : indices) {
		while (!stack.empty() && stack.top().second < coordinate[i].y) {
			uft.merge(i, stack.top().first);
			stack.pop();
		}
		stack.emplace(i, coordinate[i].y);
	}
	std::reverse(indices.begin(), indices.end());
	while (!stack.empty()) stack.pop();
	for (const auto i : indices) {
		while (!stack.empty() && stack.top().second > coordinate[i].y) {
			uft.merge(i, stack.top().first);
			stack.pop();
		}
		stack.emplace(i, coordinate[i].y);
	}
	for (auto i = 0; i < n; ++i) {
		std::cout << uft.size(i) << '\n';
	}
}


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

#if 1
	
	#include <iostream>
	#include <string>
	#include <vector>
	
	using namespace std;
	
#else
	
	#include <stdio.h>
	#include <string.h>
	
#endif

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	
	int n;
	cin >> n;
	
	vector<pair<int, int>> city;
	city.resize(n);
	
	vector<int> counter;
	counter.resize(n)
	
	cin >> city[0].first >> city[0].second;
	for (int i = 1; i < n; i++)
	{
		cin >> city[i].first >> city[i].second;
		for (int j = 0; j < i; j++)
		{
			if (city[i].first < city[j].first && city[i].second < city[j].second
			||  city[i].first > city[j].first && city[i].second > city[j].second)
			{
				counter[i]++;
				cunnter[j]++;
			}
		}
	}
	
	for (int i : counter)
	{
		cout << i << '\n';
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:26: error: expected ';' before 'cin'
   29 |         counter.resize(n)
      |                          ^
      |                          ;
   30 | 
   31 |         cin >> city[0].first >> city[0].second;
      |         ~~~               
a.cc:41:33: error: 'cunnter' was not declared in this scope; did you mean 'counter'?
   41 |                                 cunnter[j]++;
      |                                 ^~~~~~~
      |                                 counter
Language: C++

/*
ID: espr1t
TASK: 
KEYWORDS: 
*/

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <set>

using namespace std;
FILE* in = stdin; FILE* out = stdout;

const int MAX = 200002;

struct Point {
    int idx;
    int x, y;
    bool operator < (const Point& r) const {
        return x != r.x ? x < r.x : y < r.y;
    }
};

int n;
Point a[MAX];
int index[MAX];
vector <int> v[MAX];
int inComp[MAX], compSize[MAX];

void color(int node, int comp) {
    compSize[comp]++;
    inComp[node] = comp;
    for (int i = 0; i < (int)v[node].size(); i++) {
        if (inComp[v[node][i]] == 0) {
            color(v[node][i], comp);
        }
    }
}

void solve() {
    sort(a, a + n);
    for (int i = 0; i < n; i++)
        index[a[i].y] = a[i].idx;

    set <int> smaller;
    for (int i = 0; i < n; i++) {
        while (true) {
            auto it = smaller.upper_bound(a[i].y);
            if (it == smaller.begin())
                break;
            it--;
            int idx = index[*it];
            v[idx].push_back(a[i].idx);
            v[a[i].idx].push_back(idx);
            smaller.erase(it);
        }
        smaller.insert(a[i].y);
    }
    int nextComp = 1;
    for (int node = 0; node < n; node++) {
        if (inComp[node] == 0) {
            color(node, nextComp++);
        }
    }
    
    for (int node = 0; node < n; node++)
        fprintf(out, "%d\n", compSize[inComp[node]]);
}

int main(void) {
	// in = fopen("A.in", "rt");
	
	fscanf(in, "%d", &n);
	for (int i = 0; i < n; i++) {
	    a[i].idx = i;
	    fscanf(in, "%d %d", &a[i].x, &a[i].y);
    }

    solve();
	
	return 0;
}

Compiler output:
a.cc:29:14: error: 'int index [200002]' redeclared as different kind of entity
   29 | int index[MAX];
      |              ^
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from a.cc:8:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'void solve()':
a.cc:46:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   46 |         index[a[i].y] = a[i].idx;
      |              ^
a.cc:55:28: error: invalid types '<unresolved overloaded function type>[const int]' for array subscript
   55 |             int idx = index[*it];
      |                            ^
Language: C

#include <iostream>

using namespace std;

int main()
{
  int matrix[3][3] = {
      {1, 2, 3},
      {4, 5, 6},
      {7, 8, 9}}; // 2-D Array or Multi-dimensional Array

  for (int i = 0; i < 3; i++)
  {
    for (int j = 0; j < 3; j++)
    {
      cout << matrix[i][j] << " " << flush;
    }

    cout << endl;
  }

  return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n, x[200000], y[200000], ans[200000];
  cin >> n;
  for(int i = 0;i < n;i++){
    cin >> x[i] >> y[i];
  }
  for(int i = 0;i < n;i++){
    for(int j = 0;j < n;j++){
    if(x[i] > x[j] && y[i] > y[j]){
      ans[i]++:
    }
      else if(x[i] < x[j] && y[i] < y[j]){
        ans[i]++;
      }
    }
    cout << ans[i];
  }
      

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: expected ';' before ':' token
   13 |       ans[i]++:
      |               ^
      |               ;
a.cc:20:4: error: expected '}' at end of input
   20 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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


int main() {
  int a, c, b;
  cin>>a;
 c=0;
  for(int i =0; i<a; i++) {
    cin >> b[i][0] >> b[i][1];
  }
  for(int j =0; j<a; j++) {
   for(int i =0; i<a; i++) {
    if((b[i][0]>b[j][0] && b[i][1]>b[j][1]) || (b[i][0]<b[j][0] && b[i][1]<b[j][1])) {
      ++c;
    }
   }
  }
     cout << 1+c << endl;
      
      
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid types 'int[int]' for array subscript
   10 |     cin >> b[i][0] >> b[i][1];
      |             ^
a.cc:10:24: error: invalid types 'int[int]' for array subscript
   10 |     cin >> b[i][0] >> b[i][1];
      |                        ^
a.cc:14:10: error: invalid types 'int[int]' for array subscript
   14 |     if((b[i][0]>b[j][0] && b[i][1]>b[j][1]) || (b[i][0]<b[j][0] && b[i][1]<b[j][1])) {
      |          ^
a.cc:14:18: error: invalid types 'int[int]' for array subscript
   14 |     if((b[i][0]>b[j][0] && b[i][1]>b[j][1]) || (b[i][0]<b[j][0] && b[i][1]<b[j][1])) {
      |                  ^
a.cc:14:29: error: invalid types 'int[int]' for array subscript
   14 |     if((b[i][0]>b[j][0] && b[i][1]>b[j][1]) || (b[i][0]<b[j][0] && b[i][1]<b[j][1])) {
      |                             ^
a.cc:14:37: error: invalid types 'int[int]' for array subscript
   14 |     if((b[i][0]>b[j][0] && b[i][1]>b[j][1]) || (b[i][0]<b[j][0] && b[i][1]<b[j][1])) {
      |                                     ^
a.cc:14:50: error: invalid types 'int[int]' for array subscript
   14 |     if((b[i][0]>b[j][0] && b[i][1]>b[j][1]) || (b[i][0]<b[j][0] && b[i][1]<b[j][1])) {
      |                                                  ^
a.cc:14:58: error: invalid types 'int[int]' for array subscript
   14 |     if((b[i][0]>b[j][0] && b[i][1]>b[j][1]) || (b[i][0]<b[j][0] && b[i][1]<b[j][1])) {
      |                                                          ^
a.cc:14:69: error: invalid types 'int[int]' for array subscript
   14 |     if((b[i][0]>b[j][0] && b[i][1]>b[j][1]) || (b[i][0]<b[j][0] && b[i][1]<b[j][1])) {
      |                                                                     ^
a.cc:14:77: error: invalid types 'int[int]' for array subscript
   14 |     if((b[i][0]>b[j][0] && b[i][1]>b[j][1]) || (b[i][0]<b[j][0] && b[i][1]<b[j][1])) {
      |                                                                             ^
Language: C++

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

typedef long long int   ll;
typedef pair<ll, ll>    pll;
typedef pair<int, int>  pii;

#define all(x)          x.begin(), x.end()
#define kill(x)         return cout << x << endl, 0
#define X               first
#define Y               second
#define sep             ' '
#define endl            '\n'

ll pw(ll a, ll b, ll mod) {
    if (!b)    return 1;
    if (b & 1) return a * pw(a * a % mod, b / 2, mod) % mod;
    return pw(a * a % mod, b / 2, mod) % mod;
}

const ll N    = 2e5 + 10;
const ll MOD  = 1e9 + 7;
const ll INF  = 1e18;

struct Point {
	int ind, x, y;
	bool operator<(const Point& oth) {
		return x < oth.x;
	}
}

int n;
Point P[N];
vector<int> vec;
dsu d(N);

int main() {
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    cin >> n;
    for (int i = 0; i < n; i++) {
    	cin >> P[i].x >> P[i].y;
    	P[i].ind = i;
    }
    sort(P, P + n);
    for (int i = 0; i < n; i++) {
    	while (!vec.empty() && P[i].y > P[vec.back()].y) {
    		d.merge(P[i].ind, P[vec.back()].ind);
    		vec.pop_back();
    	}
    	vec.push_back(i);
    }
    for (int i = 1; i <= n; i++) {
    	cout << d.size(i) << sep;
    }
    cout << endl;
    return 0;
}


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

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

int main()
{
      ios::sync_woth_stdio(0);
     cin.tie(0);
     cout.tie(0);
int i,j,k,n;
cin>>n;
for(i=0;i<n;i++)
{
cin>>j>>k;
if(j>0 && k>0)
cout<<(j-1)*(k-1);
else cout<<0;
cout<<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'sync_woth_stdio' is not a member of 'std::ios' {aka 'std::basic_ios<char>'}
    6 |       ios::sync_woth_stdio(0);
      |            ^~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define F first
#define S second
#define R cin>>
#define ll long long
#define ln cout<<'\n'
#define in(a) insert(a)
#define pb(a) push_back(a)
#define pd(a) printf("%.10f\n",a)
#define mem(a) memset(a,0,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define iter(c) __typeof((c).begin())
#define rrep(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
ll check(ll n,ll m,ll x,ll y){return x>=0&&x<n&&y>=0&&y<m;}void pr(){ln;}
template<class A,class...B>void pr(const A &a,const B&...b){cout<<a<<(sizeof...(b)?" ":"");pr(b...);}
template<class A>void PR(A a,ll n){rep(i,n)cout<<(i?" ":"")<<a[i];ln;}
const ll MAX=1e9+7,MAXL=1LL<<61,dx[8]={-1,0,1,0,-1,-1,1,1},dy[8]={0,1,0,-1,-1,1,1,-1};
typedef pair<ll,ll> P;
typedef pair<P,ll> PP;

int p[200001],r[200001],c[200001];
void init(){rep(i,200001)p[i]=i,r[i]=0,c[i]=1;}
int find(int x){return (p[x]==x)?x:(p[x]=find(p[x]));}
void unite(int x,int y) {
  x=find(x),y=find(y);
  if(x==y)return;
  int cx=c[x],cy=c[y];
  if(r[x]<r[y])p[x]=y;
  else{p[y]=x;if(r[x]==r[y])r[x]++;}
  c[find(x)]=cx+cy;
}
bool same(int x,int y){return find(x)==find(y);}

void Main() {
  init();
  ll n;
  cin >> n;
  PP a[n];
  rep(i,n) {
    cin >> a[i].F.F >> a[i].F.S;
    a[i].S=i;
  }
  sort(a,a+n);
  ll M=MAX,x=-1;
  rep(i,n) {
    if(M<a[i].F.S) unite(a[i].S,x);
    if(M>a[i].F.S) {
      M=a[i].F.S;
      x=a[i].S;
    }
  }
  M=-MAX,x=-1;
  rrep(i,n) {
    if(M>a[i].F.S) unite(a[i].S,x);
    if(M<a[i].F.S) {
      M=a[i].F.S;
      x=a[i].S;
    }
  }
  rep(i,n) pr(c[find(i)]);
}

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


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

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


int main(){
	
	int N;
	cin>>N;
	
	vector<vector<int>> X(N);
	
	rep(i,N){
		int x,y;
		scanf("%d %d",&x,&y);
		X[i] = {x,y,i};
	}
	
	sort(X.begin(),X.end());
	dsu D(N);
	set<pair<int,int>> S;
	
	rep(i,N){
		if(S.size()>0 && (S.begin()->first)<X[i][1]){
			pair<int,int> Keep = *S.begin();
			S.erase(S.begin());
			while(S.size()>0 && S.begin()->first < X[i][1]){
				D.merge(S.begin()->second,X[i][2]);
				S.erase(S.begin());
			}
			D.merge(Keep.second,X[i][2]);
			S.insert(Keep);
		}
		else{
			S.insert(make_pair(X[i][1],X[i][2]));
		}
	}
	
	rep(i,N){
		cout<<D.size(i)<<endl;
	}
	
	return 0;
}
 

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

#include <bits/stdc++.h>
using namespace std;
 
#define send {ios_base::sync_with_stdio(false);}
#define help {cin.tie(NULL); cout.tie(NULL);}
#define f first
#define s second
#define getunique(v) {sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end());}
typedef long long ll;
typedef long double lld;
typedef unsigned long long ull;
 
template<typename A> ostream& operator<<(ostream &cout, vector<A> const &v);
template<typename A, typename B> ostream& operator<<(ostream &cout, pair<A, B> const &p) { return cout << "(" << p.f << ", " << p.s << ")"; }
template<typename A> ostream& operator<<(ostream &cout, vector<A> const &v) {
	cout << "["; for(int i = 0; i < v.size(); i++) {if (i) cout << ", "; cout << v[i];} return cout << "]";
}
template<typename A, typename B> istream& operator>>(istream& cin, pair<A, B> &p) {
	cin >> p.first;
	return cin >> p.second;
}
 
mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());
// mt19937 rng(61378913);
/* usage - just do rng() */
 
void usaco(string filename) {
  // #pragma message("be careful, freopen may be wrong")
	freopen((filename + ".in").c_str(), "r", stdin);
	freopen((filename + ".out").c_str(), "w", stdout);
}

#include <atcoder/all>
using namespace atcoder;
 
const lld pi = 3.14159265358979323846;
// const ll mod = 1000000007;
// const ll mod = 998244353;
// ll mod;
 


ll n, m, k, q, l, r, x, y, z;
const ll template_array_size = 1e6 + 1531;
ll a[template_array_size];
ll b[template_array_size];
ll c[template_array_size];
string s, t;
ll ans = 0;

pair<pair<ll, ll>, ll> p[200005];
ll res[200005];
bool vis[200005];

void solve(int tc = 0) {
	cin >> n;
	
	for (ll i = 0; i < n; i++) {
		cin >> p[i].f;
		p[i].s = i;
	}
	
	sort(p, p + n);
	
	for (ll i = 0; i < n; i++) res[i] = -1;
	
	memset(vis, 0, sizeof(vis));
	
	ll last = 0;
	ll pt = n;
	for (ll i = 0; i < n; i++) {
		vis[p[i].f.s] = 1;
		
		while (vis[pt]) --pt;
		
		if (pt == n - i - 1) {
			res[i] = i - last + 1;
			last = i + 1;
		}
	}
	
	ll r;
	for (ll i = n - 1; i >= 0; i--) {
		if (res[i] != -1) r = res[i];
		res[i] = r;
		b[p[i].s] = res[i];
	}
	
	for (ll i = 0; i < n; i++) cout << b[i] << '\n';
}
 
int main() {
	#ifdef galen_colin_local
		auto begin = std::chrono::high_resolution_clock::now();
	#endif
	
	send help
 
	#ifndef galen_colin_local
		// usaco("moop");
	#endif
	
	// usaco("cowland");
	
	// freopen("tc.cpp", "r", stdin);
 
	
	
	int tc = 1;
	// cin >> tc;
	for (int t = 0; t < tc; t++) solve(t);
	
	#ifdef galen_colin_local
		auto end = std::chrono::high_resolution_clock::now();
		cout << setprecision(4) << fixed;
		// cout << "Execution time: " << std::chrono::duration_cast<std::chrono::duration<double>>(end - begin).count() << " seconds" << endl;
	#endif
} 

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

#include<stdio.h>

int main(void){
  int n;
  scanf("%d",&n);
  int x[n],y[n];
  for(int i=0;i<n:i++){
    scanf("%d %d",&x[i],&y[i]);
  }
  for(int i=0;i<n:i++){
    int c=1;
     for(int j=0;j<n:j++){
    
       if(x[i]>x[j] && y[i]>y[j]){
         c++;
       }
       if(x[i]<x[j] && y[i]<y[j]){
         c++;
       }
     }
    
    printf("%d\n",c);   
    
  }
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:7:18: error: expected ';' before ':' token
    7 |   for(int i=0;i<n:i++){
      |                  ^
      |                  ;
main.c:10:18: error: expected ';' before ':' token
   10 |   for(int i=0;i<n:i++){
      |                  ^
      |                  ;
main.c:12:21: error: expected ';' before ':' token
   12 |      for(int j=0;j<n:j++){
      |                     ^
      |                     ;
Language: C++

#pragma GCC optimize("O3")
#include <atcoder/all>
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// gp_hash_table<int, int> mapka;

using namespace std;
#define PB push_back
#define MP make_pair
#define LL long long
#define int LL
#define FOR(i,a,b) for(int i = (a); i <= (b); i++)
#define RE(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(int)(n)-1)
#define R(i,n) REP(i,n)
#define VI vector<int>
#define PII pair<int,int>
#define LD long double
#define FI first
#define SE second
#define st FI
#define nd SE
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())

template<class C> void mini(C &a4, C b4) { a4 = min(a4, b4); }
template<class C> void maxi(C &a4, C b4) { a4 = max(a4, b4); }

template<class TH> void _dbg(const char *sdbg, TH h){ cerr<<sdbg<<'='<<h<<endl; }
template<class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
  while(*sdbg!=',')cerr<<*sdbg++;
  cerr<<'='<<h<<','; _dbg(sdbg+1, a...);
}

template<class T> ostream &operator<<(ostream& os, vector<T> V) {
  os << "["; for (auto vv : V) os << vv << ","; return os << "]";
}
template<class L, class R> ostream &operator<<(ostream &os, pair<L,R> P) {
  return os << "(" << P.st << "," << P.nd << ")";
}

#ifdef LOCAL
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (__VA_ARGS__)
#define cerr if(0)cout
#endif

int n;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  cerr << fixed << setprecision(6);
  cin >> n;
  vector<int> t(n);
  vector<int> res(n);
  vector<int> kt(n);
  R(i,n){
    int x,y;
    cin >> x >> y;
    x--;y--;
    t[x] = n - y - 1;
    kt[x] = i;
  }
  int ma = 0;
  int ost = -1;
  R(i,n){
    maxi(ma,t[i]);
    if(ma == i){
      for(int j = ost + 1; j <= i; j++){
        res[kt[j]] = i - ost;
      }
      ost = i;
    }
  }
  R(i,n)cout << res[i] << "\n";
}


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

#ifndef INCLUDE_GUARD_MATH_UTILITY_HPP
#define INCLUDE_GUARD_MATH_UTILITY_HPP

/*
last-updated: 2020/09/21

# 仕様
T gcd(T a, T b)
	時間計算量: O(log max{a, b})
	非負整数 a と b の最大公約数を返す
	一方の値が 0 のときはもう一方の値を返す

T lcm(T a, T b)
	時間計算量: O(log max{a, b})
	非負整数 a と b の最小公倍数を返す
	a = 0 または b = 0 のときは 0 を返す

T ext_gcd(const T & a, T & x, const T & b, T & y)
	時間計算量: O(log b)
	a > 0 かつ b > 0
	一次不定方程式 ax + by = gcd(x, y) の解 (x, y) を求める
	gcd(a, b) を返す

T mod_pow(T x, T n, const T & mod)
	時間計算量: Θ(log n)
	a^n (modulo. mod) を返す
	計算過程で O(mod^2) 程度まで値が大きくなるので注意

// std::pair<T, T> inv_gcd(T x, const T & mod)
// 	時間計算量: O(log max{x, mod})
// 	{ modulo. mod 上の x の逆元, gcd(x, mod) } を返す

T mod_inv(const T & x, const T & mod)
	時間計算量: O(log max{x, mod})
	modulo. mod 上の x の逆元を返す
	gcd(x, mod) = 1 である必要がある(逆元が存在するための必要十分条件)

std::pair<bool, T> chinese_remainder(const T & b1, const T & m1, const T & b2, const T & m2)
	時間計算量: O(log max{m1, m2})
	次の条件を満たす最小の非負整数 x を求める(0 \leq x < lcm(m1, m2))
		x \equiv b1 (mod. m1)
		x \equiv b2 (mod. m2)
	戻り値: { x, lcm(m1, m2) }
	上の条件を満たす x は周期 lcm(m1, m2)
	x が存在しない場合は {0, 0} を返す

# 参考
AC Library, 2020/09/21
https://noshi91.hatenablog.com/entry/2019/04/01/184957, 2020/01/14
*/

#include <cassert>
#include <utility>
#include <cmath>

namespace tk {
template<typename T>
T gcd(T a, T b) {
	assert(a >= 0);
	assert(b >= 0);
	while (b != 0) {
		T t = a % b;
		a = b; b = t;
	}
	return a;
}

template<typename T>
T lcm(T a, T b) {
	assert(a >= 0);
	assert(b >= 0);
	if (a == 0 || b == 0) return 0;
	return a / gcd(a, b) * b;
}

template<typename T>
T ext_gcd(const T & a, T & x, const T & b, T & y) {
	assert(a > 0);
	assert(b > 0);
	T a0 = a, a1 = 1, a2 = 0, b0 = b, b1 = 0, b2 = 1;
	while (b0 > 0) {
		T q = a0 / b0, r = a0 % b0;
		T nb1 = a1 - q * b1, nb2 = a2 - q * b2;
		a0 = b0; b0 = r;
		a1 = b1; b1 = nb1;
		a2 = b2; b2 = nb2;
	}
	x = a1;
	y = a2;
	return a0;
}

template<typename T>
T mod_pow(T x, T n, const T & mod) {
	assert(mod > 0);
	assert(n >= 0);
	x = (x % mod + mod) % mod;
	T res = 1 % mod;
	while (n > 0) {
		if (n & 1) res = res * x % mod;
		x = x * x % mod;
		n >>= 1;
	}
	return res;
}

template<typename T>
T mod_inv(const T & x, const T & mod) {
	assert(mod > 0);
	T a, b;
	T g = ext_gcd(x, a, mod, b);
	assert(g == 1);
	return (a % mod + mod) % mod;
}

template<typename T>
std::pair<T, T> chinese_remainder(T b1, T m1, T b2, T & m2) {
	assert(m1 > 0);
	assert(m2 > 0);
	if (m1 < m2) { std::swap(b1, b2); std::swap(m1, m2); }
	b1 = (b1 % m1 + m1) % m1;
	b2 = (b2 % m2 + m2) % m2;
	
	T x, y;
	T g = ext_gcd(m1, x, m2, y);
	const T pm2 = m2 / g;
	x = (x % pm2 + pm2) % pm2;
	
	if ((b2 - b1) % g != 0) return {0, 0};
	const T t = ((b2 - b1) / g % pm2 + pm2) % pm2 * x % pm2;
	return {b1 + t * m1, m1 * pm2};
}
} // namespace tk

#endif // INCLUDE_GUARD_MATH_UTILITY_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++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <atcoder/all>
using namespace std;
using namespace __gnu_pbds;
#define int long long
#define endl '\n'
#define pb push_back
#define fi first
#define se second
#define all(c) (c).begin(),(c).end()
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define TRACE
#ifndef ONLINE_JUDGE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif

const ll inf = 2e18;
const int mod = 1e9 + 7;
const int N = 2e5 + 10;

int modpow(int x, int n, int m) {
	x %= m;
	int res = 1;
	while(n > 0) {
		if(n & 1)
			res = res * x % m;
		x = x * x % m;
		n >>= 1;
	}
	return res;
}

signed main() {
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

	int n;
	cin >> n;
	vector<pii> div;
	int tmp = 2 * n;
	for(int i = 2; i * i <= tmp; i++) {
		if(tmp % i == 0) {
			int cur = 1;
			while(tmp % i == 0) {
				tmp /= i;
				cur *= i;
			}
			div.pb({cur, i});
		}
	}
	if(tmp > 1) {
		div.pb({tmp, tmp});
	}
	int sz = div.size();
	int ans = 2 * n;
	for(int mask = 0; mask < (1LL << sz); mask++) {
		int x = 1, y = 1, phi = 1;
		for(int i = 0; i < sz; i++) {
			if(mask & (1LL << i)) {
				x *= div[i].fi;
				phi *= (div[i].fi - (div[i].fi / div[i].se));
			}
			else {
				y *= div[i].fi;
			}
		}
		if(y != 1) {
			// int z = modpow(y, phi - 1, x);
			int z = inv_mod(y, x);
			ans = min(ans, y * z - 1);
		}
	}
	cout << ans;

	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) begin(v),end(v)
#define fi first
#define se second
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
using ll = long long;
using pii = pair<int, int>;
constexpr ll INF = 1ll<<30;
constexpr ll longINF = 1ll<<60;
constexpr ll MOD = 1000000007;
constexpr bool debug = 0;
//---------------------------------//

#include <atcoder/math>

vector<ll> find_divisor(ll n) {
	vector<ll> divisor;
	
	ll i = 1;
	for (; i * i <= n; i++) if (n % i == 0) divisor.push_back(i);
	i--;
	if (i * i == n) i--;
	for (; i >= 1; i--) if (n % i == 0) divisor.push_back(n / i);
	
	return divisor;
}

int main() {
	ll N;
	cin >> N;
	N *= 2;
	
	ll ans = longINF;
	auto div = find_divisor(N);
	
	for (auto x : div) {
		ll y = N / x;
		// k(k + 1) \equiv 0 (mod. N)
		// x | k, y | k + 1
		// k \equiv 1 (mod. x)
		// k \equiv -1 (mod. y)
		std::vector<ll> b(2), m(2);
		b[0] = 0; m[0] = x;
		b[1] = y - 1; m[1] = y;
		auto res = atcoder::crt(b, m);
		if (res.second == 0) continue;
		
		ll p = res.first;
		if (p == 0) p += x * y;
		chmin(ans, p);
	}
	
	cout << ans << endl;
	return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n - 1); i >= 0; i--)
#define ALL(v) v.begin(), v.end()
using P = pair<int, int>;
typedef long long ll;
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; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const ll MAX = (1LL << 60);

vector<long long> divisor(long long n) {
    vector<long long> ret;
    for (long long i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            ret.push_back(i);
            if (i * i != n) ret.push_back(n / i);
        }
    }
    sort(ret.begin(), ret.end()); // 昇順に並べる
    return ret;
}

int main() {
  ll n;
  cin >> n;
  ll ans = MAX;
  if(n % 2 == 1){
    ll ans = (n - 1);
    cout << ans << endl;
    return 0;
  }
  vector<ll> r(2), m(2);
  vector<ll> res = divisor(2 * n);
  rep(i, res.size()){
    ll num = (2 * n) / res[i];
    r[0] = 0, m[0] = res[i];
    r[1] = -1, m[1] = num;
    auto p = atcoder::crt(r, m);
    if (p.first != 0 && p.second != 0) chmin(ans, p.first);
  }
  cout << ans << endl;
}

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>
#define int long long
int mN,A,i=1;
void a(int x,int y){
  if(std::gcd(x,y)==1)
    A=atcoder::inv_mod(x,y)*x,m=std::min(m,(A>1?A:A+x*y)-1);
}
signed main(){
  std::cin>>N;N*=2;m=N*9;
  for(;i*i<=N;i++)
    if(N%i==0)a(i,N/i),a(N/i,i);
  printf("%lld\n",m);
}

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>
#define int long long
int m,N,A,i=1;
void a(int x,int y){
  if(std::gcd(x,y)-1?0:A=atcoder::inv_mod(x,y)*x)
    m=std::min(m,(A>1?A:A+x*y)-1);
}
signed main(){
  std::cin>>N;N*=2;m=N*9;
  for(;i*i<=N;i++)if(N%i==0)a(i,N/i),a(N/i,i);
  printf("%d\n",m);
}

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>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define ll long long
#define ld long double
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(i,n) RREP(i,(n)-1,0)
#define all(v) v.begin(), v.end()
#define endk '\n'
const int inf = 1e9+7;
const ll longinf = 1LL<<60;
const ll mod = 1e9+7;
const ll mod2 = 998244353;
const ld eps = 1e-10;
template<typename T1, typename T2> inline void chmin(T1 &a, T2 b){if(a>b) a=b;}
template<typename T1, typename T2> inline void chmax(T1 &a, T2 b){if(a<b) a=b;}

void find_divisor(ll N, vector<ll>& divisor) {
  for(int i=1; i<=sqrt(N); i++) {
    if(N % i == 0)
      divisor.push_back(i);
  }
  int n = divisor.size();
  for(int i=n-1; i>=0; i--) {
    if(N != (ll)pow(divisor[i], 2))
      divisor.push_back(N / divisor[i]);
  }
}
ll extGCD(ll a, ll b, ll &x, ll &y) {
  if(b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  ll d = extGCD(b, a%b, y, x);
  y -= a/b * x;
  return d;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n; cin >> n;
  vector<ll> div;
  find_divisor(n*2, div);
  ll ans = n*2-1;
  for(ll d1: div) {
    ll d2 = n*2/d1;
    if(__gcd(d1, d2) != 1) continue;
    auto ret = crt({0, -1}, {d1, d2});
    if(ret.first == 0) continue;
    chmin(ans, ret.first);
  }
  cout << ans << endk;
  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/math>
//#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;
  long long n;
  cin>>n;
  
  vector<long long> divs;
  for(long long k = 1; k <= sqrt(2 * n); k++){
    if((2 * n) % k != 0) continue;
    divs.push_back(k);
    divs.push_back((2*n)/k);
  }
  sort(ALL(divs));
  
  long long ans = INF;
  for(long long x: divs){
    vector<long long> rems = {0, -1};
    vector<long long> mods = {x, (2*n)/x};
    pair<long long, long long> p = crt(rems, mods);
    long long y = p.first, z = p.second;
    if(y == 0 && z == 0) continue;
    if(y == 0) y = z;
    ans = min(ans, y);
  }
  
  cout << ans << endl;  
  return 0;
}


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

#include <bits/stdc++.h>
#include <atcoder/math>
//#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;
  long long n;
  cin>>n;
  
  vector<long long> divs;
  for(long long k = 1; k <= sqrt(2 * n); k++){
    if((2 * n) % k != 0) continue;
    divs.push_back(k);
    divs.push_back((2*n)/k);
  }
  sort(ALL(divs));
  
  long long ans = INF;
  for(long long x: divs){
    vector<long long> rems = {0, -1};
    vector<long long> mods = {x, (2*n)/x};
    pair<long long, long long> p = crt(rems, mods);
    long long y = p.first, p.second;
    if(y == 0 && z == 0) continue;
    ans = min(ans, y);
  }
  
  cout << ans << endl;  
  return 0;
}


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

#include <bits/stdc++.h>
#include <atcoder/crt>
//#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;
  long long n;
  cin>>n;
  
  vector<long long> divs;
  for(long long k = 1; k <= sqrt(2 * n); k++){
    if((2 * n) % k != 0) continue;
    divs.push_back(k);
    divs.push_back((2*n)/k);
  }
  sort(ALL(divs));
  
  long long ans = INF;
  for(long long x: divs){
    vector<long long> rems = {0, -1};
    vector<long long> mods = {x, (2*n)/x};
    pair<long long, long long> p = crt(rems, mods);
    long long y = p.first, p.second;
    if(y == 0 && z == 0) continue;
    ans = min(ans, y);
  }
  
  cout << ans << endl;  
  return 0;
}


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

#include <bits/stdc++.h>
#include <atcoder/math>
//#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;
  long long n;
  cin>>n;
  
  vector<long long> divs;
  for(long long k = 1; k <= sqrt(2 * n); k++){
    if((2 * n) % k != 0) continue;
    divs.push_back(k);
    divs.push_back((2*n)/k);
  }
  sort(ALL(divs));
  
  long long ans = INF;
  for(long long x: divs){
    vector<long long> rems = {0, -1};
    vector<long long> mods = {x, (2*n)/x};
    pair<long long, long long> p = crt(rems, mods);
    long long y = p.first, p.second;
    if(y == 0 && z == 0) continue;
    ans = min(ans, y);
  }
  
  cout << ans << endl;  
  return 0;
}


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

#include <bits/stdc++.h>
#include <atcoder/math>
//#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;
  long long n;
  cin>>n;
  
  vector<long long> divs;
  for(long long k = 1; k <= sqrt(2 * n); k++){
    if((2 * n) % k != 0) continue;
    divs.push_back(k);
    divs.push_back((2*n)/k);
  }
  sort(ALL(divs));
  
  long long ans = INF;
  for(long long x: divs){
    vector<long long> rems = {0, -1};
    vector<long long> mods = {x, (2*n)/x};
    P p = crt(rems, mods);
    long long y = p.first, p.second;
    if(y == 0 && z == 0) continue;
    ans = min(ans, y);
  }
  
  cout << ans << endl;  
  return 0;
}


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