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

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<char> vc;
typedef queue<ll> ql;
typedef deque<ll> dql;
typedef priority_queue<ll/*, vl, greater<ll>*/> pql; //降順(/*昇順*/)
typedef set<ll> sl;
typedef pair<ll, ll> pl;
typedef pair<pl, ll> ppl;
typedef vector<vl> vvl;
typedef vector<pl> vpl;
#define rep(i, n) for(ll i = 0; i < ll(n); i++)
#define rep2(i, k, n) for(ll i = ll(k); i <= ll(n); i++)
#define rep3(i, n, k) for(ll i = ll(n); i >= ll(k); i--)
#define all(v) (v).begin(), (v).end()
ll mod(ll a, ll b) {if(b == 0) return 0; return (a % b + b) % b;}
bool chmin(ll &a, ll b) {if(b < a) {a = b; return 1;} return 0;}
bool chmax(ll &a, ll b) {if(b > a) {a = b; return 1;} return 0;}
const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;
//const ll MOD = 998244353;
const ll MAX = 1e9;
const char newl = '\n';

ll extended_euclidian(ll a, ll b) {
  ll s=a, t=b, x=1, y=0, u=0, v=1, k;
  while(t) {
    k = s / t;
    s -= k * t;
    swap(s, t);
    x -= k * u;
    swap(x, u);
    y -= k * v;
    swap(y, v);
  }
  if(x>0) return a*x-1;
  else return b*y-1;
}

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

  ll N;
  cin >> N;

  if(N == 1) {
    cout << 1 << newl;
    return 0;
  }

  ll ans = N-1;

  ll n = sqrt(N);
  vl is_prime(n+1, 1);
  is_prime[0] = 0;
  is_prime[1] = 0;

  N *= 2;
  vl p, r;

  rep2(i, 2, n) {
    if(!is_prime[i]) continue;
    for(ll j=i; i*j<=n; j++) is_prime[i*j] = 0;

    if(N%i == 0) {
      p.push_back(i);
      r.push_back(0);
      while(N%i == 0) {
        N /= i;
        r.back()++;
      }
    }
  }

  if(N>1) {
    p.push_back(N);
    r.push_back(1);
  }

  if(r.front()==1 and p.back()>n) {
    cout << ans << newl;
    return 0;
  }

  ll ps = p.size();
  vl P(ps);
  rep(i, ps) P[i] = pow(p[i], r[i]);

  rep(i, 1 << (ps-1)) {
    vb choose(ps, 0);
    rep(j, ps-1) if(i ^ (2 << j)) choose[j]=1;
    ll a=1, b=1;
    rep(j, ps) {
      if(choose[j]) a *= P[j];
      else b *= P[j];
    }

    chmin(ans, extended_euclidian(a, b));
    chmin(ans, extended_euclidian(b, a));
  }
  cout << ans << newl;
  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;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<char> vc;
typedef queue<ll> ql;
typedef deque<ll> dql;
typedef priority_queue<ll/*, vl, greater<ll>*/> pql; //降順(/*昇順*/)
typedef set<ll> sl;
typedef pair<ll, ll> pl;
typedef pair<pl, ll> ppl;
typedef vector<vl> vvl;
typedef vector<pl> vpl;
#define rep(i, n) for(ll i = 0; i < ll(n); i++)
#define rep2(i, k, n) for(ll i = ll(k); i <= ll(n); i++)
#define rep3(i, n, k) for(ll i = ll(n); i >= ll(k); i--)
#define all(v) (v).begin(), (v).end()
ll mod(ll a, ll b) {if(b == 0) return 0; return (a % b + b) % b;}
bool chmin(ll &a, ll b) {if(b < a) {a = b; return 1;} return 0;}
bool chmax(ll &a, ll b) {if(b > a) {a = b; return 1;} return 0;}
const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;
//const ll MOD = 998244353;
const ll MAX = 1e9;
const char newl = '\n';

ll extended_euclidian(ll a, ll b) {
  ll s=a, t=b, x=1, y=0, u=0, v=1, k;
  while(t) {
    k = s / t;
    s -= k * t;
    swap(s, t);
    x -= k * u;
    swap(x, u);
    y -= k * v;
    swap(y, v);
  }
  if(x>0) return a*x-1;
  else return b*y-1;
}

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

  ll N;
  cin >> N;

  if(N == 1) {
    cout << 1 << newl;
    return 0;
  }

  ll ans = N-1;

  ll n = sqrt(N);
  vl is_prime(n+1, 1);
  is_prime[0] = 0;
  is_prime[1] = 0;

  N *= 2;
  vl p, r;

  rep2(i, 2, n) {
    if(!is_prime[i]) continue;
    for(ll j=i; i*j<=n; j++) is_prime[i*j] = 0;

    if(N%i == 0) {
      p.push_back(i);
      r.push_back(0);
      while(N%i == 0) {
        N /= i;
        r.back()++;
      }
    }
  }

  if(N>1) {
    p.push_back(N);
    r.push_back(1);
  }

  if(r.front()==1 and p.back()>n) {
    cout << ans << newl;
    return 0;
  }

  ll ps = p.size();
  vl P(ps);
  rep(i, ps) P[i] = pow(p[i], r[i]);

  rep(i, 1 << (ps-1)) {
    vb choose(ps, 0);
    rep(j, ps-1) if(i ^ (2 << j)) choose[j]=1;
    ll a=1, b=1;
    rep(j, ps) {
      if(choose[j]) a *= P[j];
      else b *= P[j];
    }

    chmin(ans, extended_euclidian(a, b));
  }
  cout << ans << newl;
  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>
using namespace std;
long long n;
long long x;
long long f=1;
int main()
{
	ios::sync_with_stdio(false);
	cin>>n;	
    if(n%2==1) {
    x=n*((n-1)/2);}
    else{
    while(n/2){f=f*2; 
    if(n%2==1){
	if(f>=n/f){	
	x=n*(2n-1)
	break;
	else
	x=n/f*((n/f-1)/2);
	break;}
    }
    }}
	cout<<x;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: unable to find numeric literal operator 'operator""n'
   16 |         x=n*(2n-1)
      |              ^~
a.cc:18:9: error: expected '}' before 'else'
   18 |         else
      |         ^~~~
a.cc:15:19: note: to match this '{'
   15 |         if(f>=n/f){
      |                   ^
a.cc: At global scope:
a.cc:23:9: error: 'cout' does not name a type
   23 |         cout<<x;
      |         ^~~~
a.cc:24:9: error: expected unqualified-id before 'return'
   24 |         return 0;
      |         ^~~~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long n;
long long x;
long long f=1;
int main()
{
	ios::sync_with_stdio(false);
	cin>>n;	
    if(n%2==1) {
    x=n*((n-1)/2);}
    else
    while(n/2){f=f*2; 
    if(n%2==1){
	if(f>=n/f){	
	x=n*(2n-1)
	break;
	else
	x=n/f*((n/f-1)/2);
	break;}
    }
    }
	cout<<x;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: unable to find numeric literal operator 'operator""n'
   16 |         x=n*(2n-1)
      |              ^~
a.cc:18:9: error: expected '}' before 'else'
   18 |         else
      |         ^~~~
a.cc:15:19: note: to match this '{'
   15 |         if(f>=n/f){
      |                   ^
a.cc: At global scope:
a.cc:23:9: error: 'cout' does not name a type
   23 |         cout<<x;
      |         ^~~~
a.cc:24:9: error: expected unqualified-id before 'return'
   24 |         return 0;
      |         ^~~~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

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

const int MOD=1000000007;
const int INF=0x3f3f3f3f;
const ll INFL=0x3f3f3f3f3f3f3f3f;

bool is_prime(ll n){
	if(n==1)return false;
	for(ll i=2;i*i<=n;i++){
		if(n%i==0)return false;
	}
	return true;
}
vector<ll>divisor(ll n){
	vector<ll>res;
	for(ll i=1;i*i<=n;i++){
		if(n%i==0){
			res.push_back(i);
			if(i!=n/i)res.push_back(n/i);
		}
	}
	return res;
}
map<ll,int>prime_factor(ll n){
	map<ll,int>res;
	for(ll i=2;i*i<=n;i++){
		while(n%i==0){
			res[i]++;
			n/=i;
		}
	}
	if(n!=1)res[n]++;
	return res;
}
vector<ll>prime_enum(int n){
	vector<bool>is_prime(n+1,true);
	is_prime[0]=is_prime[1]=false;
	vector<ll>res;
	for(int i=2;i<=n;i++){
		if(!is_prime[i])continue;
		res.push_back(i);
		for(int j=2*i;j<=n;j+=i){
			is_prime[j]=false;
		}
	}
	return res;
}

#include <atcoder/math>
using namespace atcoder;

int main(){
	ll n;cin>>n;
	auto mp=prime_factor(n);
	mp[2]++;
	assert(mp.size()<=20);
	int N=mp.size();
	vector<ll>v;
	for(auto p:mp){
		ll A=1;
		rep(i,p.second){
			A*=p.first;
		}
		v.push_back(A);
	}
	ll Min=LLONG_MAX;
	rep(i,1<<N){
		ll a=1,b=1;
		rep(j,N){
			if(i>>j&1)a*=v[j];
			else b*=v[j];
		}
		auto res=crt({0,1},{a,b});
		ll d=(res.first+res.second-1)%res.second;
		if(d==0)d+=res.second;
		Min=min(Min,d);
	}
	cout<<Min<<endl;
	//~ ll a=1;
	//~ int cnt=0;
	//~ for(ll i=1;;i++){
		//~ if(is_prime(i)){
			//~ a*=i;
			//~ cnt++;
			//~ if(a>=1e15){
				//~ cout<<a<<' '<<cnt<<endl;
				//~ return 0;
			//~ }
		//~ }
	//~ }
	//~ for(int n=1;n<=100;n++){
		//~ for(int k=1;;k++){
			//~ if((k*(k+1))%n==0){
				//~ cout<<n<<' '<<k<<endl;
				//~ break;
			//~ }
		//~ }
	//~ }
}

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

#include<bits/stdc++.h>

using namespace std;

int main(){
    int n;
    cin>>n;
    long long int dp[100000000];
    while(1){
        dp[i]=(i*(i+1))/2;
        if(dp[i]>n){
            cout<<i-1;
            break;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'i' was not declared in this scope
   10 |         dp[i]=(i*(i+1))/2;
      |            ^
Language: C++

#include <bits/stdc++.h>

#include <atcoder/all>
#define For(i, a, b) for (int(i) = (int)(a); (i) < (int)(b); ++(i))
#define rFor(i, a, b) for (int(i) = (int)(a)-1; (i) >= (int)(b); --(i))
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef unsigned long long ulint;
typedef pair<int, int> pii;
typedef pair<lint, lint> pll;
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 (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T>
T div_floor(T a, T b) {
    if (b < 0) a *= -1, b *= -1;
    return a >= 0 ? a / b : (a + 1) / b - 1;
}
template <class T>
T div_ceil(T a, T b) {
    if (b < 0) a *= -1, b *= -1;
    return a > 0 ? (a - 1) / b + 1 : a / b;
}

constexpr lint mod = 1000000007;
constexpr lint INF = mod * mod;
constexpr int MAX = 200010;

using namespace atcoder;

int main() {
    lint n;
    scanf("%lld", &n);
    lint ans = LLONG_MAX;
    for (lint a = 1; a * a <= 2 * n; ++a) {
        if (2 * n % a == 0) {
            lint b = 2 * n / a;
            auto f = [&](lint x, lint y) {
                vector<lint> r = {x - 1, 0}, m = {x, y};
                auto [s, t] = crt(r, m);
                if (s == 0) return t == 0 ? LLONG_MAX : s + t;
                return s;
            };
            chmin(ans, f(a, b));
            chmin(ans, f(b, a));
        }
    }
    printf("%lld\n", ans);
}

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>
#define ll long long int 
using namespace std;

int main()
{
	ll n;
	cin>>n;
	ll k=1;
	ll sum=0;
	for(;;k++)
	{
		sum+=k;
		if(sum%n==0)
			{
				break;
			}
	}
	cout<<k<<endl;
	return 0;
}

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

import java.io.*; import java.util.*;
public class B {
    static ArrayList<Long> arl;
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        long N=2*Long.parseLong(br.readLine());
        arl=new ArrayList<>();
        fact(N);
        int n=arl.size();
        
        long ans=N-1;
        for (int i = 0; i < (1<<n); i++) {//WLOG, n-1 is in the second set
            long A=1;
            for (int j = 0; j < n; j++) {
                if((i&(1<<j))>0){
                    A*=arl.get(j);
                }
            }
            long B=N/A;
            long x=inv(B,A);
            //System.out.println(A+" "+B+" "+x);
            if(x*B>1){
                ans=Math.min(ans,x*B-1);
            }
            
        }
        System.out.println(ans);
    }
    public static void fact(long i){
        for (int j = 2; j <= Math.sqrt(i); j++) {
            long cur=1;
            while(i%j==0){
                i/=j; cur*=j;
            }
            if(cur>1){
                arl.add(cur);
            }
            
        }
        if(i>1){
            arl.add(i);
        }
    }
    public static long inv(long a, long b){//Computes modular inverse of a mod b
        //Assume b>a and gcd(a,b)=1, 
        if(a==1)return 1;
        long q=b/a;
        long r=b-q*a;
        long y=-inv(r,a);
        return ((b*y+1)/a)+b;
        
    }
}


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

#include<iostream>
#include<cmath>
#include<atcoder/all>
#include<map>
using namespace std;
typedef long long li;
#define minimize(a,b) (a>(b)?a=(b),1:0)
#define maximize(a,b) (a<(b)?a=(b),1:0)
#define rep(i,n) for(li i=0;i<(n);i++)
#define df 0
template<class T> void print(const T& t){ cout << t << "\n"; }
template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }
void linear_sieve(int n,vector<int>& prime,vector<int>& seive){
  int a=seive.size()-1;
  if(a>=n or n<=1) return;
  seive.resize(n+1,0);
  seive[1]=1;
  rep(i,n/2+1){
    if(df)print("i,a",i,a);
    if(i<a)i=a;
    if(i<2){i=1;continue;}
    if(seive[i]==0){
      seive[i]=i;
      prime.push_back(i);
      if(df)printf("[%d]%d ",i,i);
    }
    for(int p:prime){
      if(p>seive[i] or i*p>n) break;
      seive[i*p]=p;
      if(df)printf("[%d]%d ",i*p,p);
    }
    if(df)print("");
  }
  rep(i,n+1){
    if(i==0) i=n/2;
    if(seive[i]==0){
      seive[i]=i;
      prime.push_back(i);
    } 
  }
}

void factorization(li n,map<li,int>& factors,int q=1){
  // require cmath
  factors.clear();
  static vector<int> prime,seive;
  const static int s_max=80000000;
  int a=seive.size()-1;
  int sq=sqrt(n)+1;
  if(q>sq) sq=n;
  //  if(df)print(sq);
  sq=min(sq,s_max);
  //  if(df)print(sq);
  if(a<sq) linear_sieve(sq,prime,seive);
  a=seive.size()-1;
  //  if(df)print("seive_size",a);
  while(n>a){
    for(int p:prime){
      while(n%p==0){
        factors[p]++;
        n/=p;
      }
      if(n<=a) break;
    }
    if(n>a){
      if(factors.size()==0){
        if(s_max<sqrt(n)+1)
          print(n,"has too large prime as factor!!!!!");
        else factors[n]++;
        return;
      }
      map<li,int> f;
      factorization(n,f);
      for(auto p:f){
        factors[p.first]+=p.second;
      }
      return;
    }
  }
  while(n!=1){
    int p=seive[n];
    factors[p]++;
    n/=p;
  }
}

li pow(li a,int r){
  li b=a,ans=1;
  while(r){
    if(r%2) ans*=b;
    b*=b;
    r/=2;
  }
  return ans;
}


int main(){
  li n; cin >>n;
  n*=2;
  //  print(n);
  map<li,int> factors;
  factorization(n,factors);
  
  vector<li> v;
  for(auto x:factors){
    v.push_back(pow(x.first,x.second));
  }
  int m=v.size(),lim=1<<m;
  li ans=n+1;
  vector<li> r(m);
  rep(bs,lim){
    rep(i,m) r[i]=-!!(bs&1<<i);
    pair<li,li> p=atcoder::crt(r,v);
    if(p.first==0) p.first+=p.second;
    if(df)print(p.first,p.second);
    minimize(ans,p.first);
  }
  print(ans);
}


Compiler output:
a.cc:3:9: 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 rep(i,n) for(int i = 0; i < (int)(n); ++i)

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

int main() {
    ll q;
    cin >> q;
    ll n = q;
    vector<ll> so;
    so.push_back(2);
    while(n % 2 == 0) {
        n /= 2;
        so.push_back(2);
    }
    for (ll i = 3; i * i <= q; i += 2) {
        if (n < i) break;
        while(n % i == 0) {
            n /= i;
            so.push_back(i);
        }
    }
    if (n != 1) so.push_back(n);
    
    ll k = 1;
    while (k * k < q) k += 10;
    while (k * k > q) k--;
    bool ok = false;
    while(1) {
        ll a = k, b = k + 1;
        for(auto i : so) {
            if (a % i == 0 || b % i == 0) {
                if (a % i == 0) a /= i;
                else b /= i;
                if (i == so[so.size() - 1]) ok = true;
            }
            else break;
        }
        if (ok) break;
        else k++;
    }
    cout << k << endl;
    return 0;
}


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

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

int main(){
long long n;
  cin >> n;
long long ans;
for(long long k=1;k<999999;k++){
if((k*(k+1))/2)%n==0){
  ans=k;
  break;
}
}  
cout << ans << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected primary-expression before '%' token
    9 | if((k*(k+1))/2)%n==0){
      |                ^
Language: C++

#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>
#include <random>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define RREP(i,m,n) for(int i=int(n)-1;i>=int(m);--i)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())
//#define int long long

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

#ifdef LOCAL
#include "../ACL.hpp"
#else 
#include <atcoder/all>
#endif

using UI = unsigned int;
using UL = unsigned long;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VVLL = vector<VLL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

// constexpr double EPS = 1e-10;
//constexpr double PI  = acos(-1.0);
//constexpr int INF = INT_MAX;
// constexpr int MOD = 1'000'000'007;
//inline void modAdd(LL &l, LL &r) {l = (l + r) % MOD;}

template<class T> inline T sqr(T x) {return x*x;}

void solve() {
    LL n;
    cin >> n;
    LL nn = n;
    // n *= 2;
    if (n == 1) {
        cout << 1 << endl;
        return;
    }
    VLL ps;
    for (LL i = 2; i * i <= n; ++i) {
        if (n % i != 0) continue;
        ps.push_back(i);
        while (n% i ==0) n /= i;
    }
    if (n > 1) ps.push_back(n);
    LL mv = ps.back();
    for (LL i = mv; i <= 2 * nn; i += mv) {
        if ((i * (i-1) / 2)%nn == 0) {
            cout << i - 1 << endl;
            return;
        }
        if ((i * (i+1) / 2)%nn == 0) {
            cout << i << endl;
            return;
        }
    }
}

signed main() {
    solve();

    return 0;
}

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

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
#ifdef __LOCAL
#define debug(x) cerr << __LINE__ << ": " << #x << " = " << (x) << '\n'
#define debugArray(x, n)                                      \
  cerr << __LINE__ << ": " << #x << " = {";                   \
  for (long long hoge = 0; (hoge) < (long long)(n); ++(hoge)) \
    cerr << ((hoge) ? "," : "") << x[hoge];                   \
  cerr << "}" << '\n'
#define debugMatrix(x, h, w)                                         \
  cerr << __LINE__ << ": " << #x << " =\n";                          \
  for (long long hoge = 0; (hoge) < (long long)(h); ++(hoge)) {      \
    cerr << ((hoge ? " {" : "{{"));                                  \
    for (long long fuga = 0; (fuga) < (long long)(w); ++(fuga))      \
      cerr << ((fuga ? ", " : "")) << x[hoge][fuga];                 \
    cerr << "}" << (hoge + 1 == (long long)(h) ? "}" : ",") << '\n'; \
  }
#else
#define debug(x) (void(0))
#define debugArray(x, n) (void(0))
#define debugMatrix(x, h, w) (void(0))
#endif

signed main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  long long N;
  cin >> N;
  long long ans = N;
  vector<long long> ps;
  for (long long p = 2; p * p <= N; p++) {
    if (N % p == 0) {
      long long pw = 1;
      while (N % p == 0) {
        N /= p;
        pw *= p;
      }
      ps.emplace_back(pw);
    }
  }
  if (N > 1) ps.emplace_back(N);
  if (ps[0] % 2 == 0) ps[0] *= 2;
  int cnt = ps.size();
  //   debugArray(ps, cnt);
  for (int s = 1; s < (1 << cnt); s++) {
    vector<long long> r(cnt);
    for (int i = 0; i < cnt; i++) {
      if ((s >> i) & 1)
        r[i] = ps[i] - 1;
      else
        r[i] = 0;
    }
    // debugArray(r, cnt);
    auto tmp = crt(r, ps);
    // debug(tmp);
    ans = min(ans, tmp.first);
  }
  cout << ans << '\n';
  return 0;
}


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

#include <iostream>

using namespace std;

int main()
{
    long int n;
    long int number=0;
    
    cin>>n;
    for(int i=1;i<n;i++)
    {
        number=number+i;
        if(number%11==0)
    
    }
    {
        cout<<n-1;
    }
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: expected primary-expression before '}' token
   16 |     }
      |     ^
Language: C++

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


int main(){
	
	long long N;
	cin>>N;
	N*=2;
	long long n = N;
	vector<long long> Y;
	for(long long i=2;i*i<=N;i++){
		if(N%i==0){
			Y.push_back(i);
			N/=i;
			while(N%i==0){
				N/=i;
				Y.back() *= i;
			}
		}
	}

	if(N!=1)Y.push_back(N);
	
	long long ans = Inf;
	
	rep(i,(1<<Y.size())){
		long long x = 1LL;
		rep(j,Y.size()){
			if((i>>j)&1)x *= Y[j];
		}
		long long y = n/x;
		//cout<<x<<','<<y<<','<<endl;
		vector<long long> r = {x,y};
		vector<long long> m = {0LL,(y*2 - 1)%y};
		pair<long long,long long> C = crt(m,r);
		
		if(C.second==0)continue;
		if(C.first==0)ans = min(ans,C.second);
		else ans = min(ans,C.first);
	}
	
	cout<<ans<<endl;
	
	return 0;
}
 

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

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
template <typename T> bool chmax(T &u, const T z) { if (u < z) {u = z; return true;} else return false; }
template <typename T> bool chmin(T &u, const T z) { if (u > z) {u = z; return true;} else return false; }
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
typedef pair<ll, ll> P;
const ll INF = 1LL << 60;
//const int MOD = 1000000007;
const ll MOD=998244353;
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }

int main(){
  ll n;
  cin>>n;
  ll ans=0;
  for(ll k=1;k<=n;k++){
    ans=(k*(k+1)/2)%n;
    //cout<<ans<<" ";
    if(ans==0){
      cout<<k<<endl;
      return 0;
    }
  }
  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>
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;



void solve(int tc = 0) {
	cin >> n;
	
	n = 2 * n;
	
	vector<ll> divs;
	
	for (ll i = 1; i * i <= n; i++) {
		if (n % i == 0) {
			divs.push_back(i);
			divs.push_back(n / i);
		}
	}
	
	getunique(divs);
	
	ll ans = 2 * n;
	
	for (ll x: divs) {
		ll v1 = x;
		ll v2 = n / x;
		
		vector<ll> a = {0, v2 - 1};
		vector<ll> b = {v1, v2};
		
		pair<ll, ll> r = crt(a, b);
		
		if (r.f != 0 && r.s != 0) ans = min(ans, r.f);
	}
	
	cout << ans << '\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 <bits/stdc++.h>
#include <atcoder/math>
using namespace std;
using namespace atcoder;

const long long inf = (long long)1e18;

long long n, ans = inf;

long long gcd(long long x, long long y) {
	if (x < y) swap(x, y);
	while (y) {
		long long r = x % y;
		x = y, y = r;
	}
	return x;
}

int main() {
	scanf("%lld", &n);
	n <<= 1;
	ans = min(ans, n - 1);
	for (int i = 1; 1ll * i * i <= n; i++) {
		if (n % i == 0) {
			long long x = i, y = n / i;
			if (gcd(x, y) > 1) continue;
			long long m = inv(x, y);
			if (x * m > 1) ans = min(ans, x * m - 1);
			m = inv(y, x);
			if (y * m > 1) ans = min(ans, y * m - 1);
		}
	}
	printf("%lld\n", ans);
	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>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cerr<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;
int getInt(){int x;scanf("%d",&x);return x;}
template<typename T>istream& operator>>(istream&i,v(T)&v){rep(j,sz(v))i>>v[j];return i;}
template<typename T>string join(const v(T)&v){stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename T>ostream& operator<<(ostream&o,const v(T)&v){if(sz(v))o<<join(v);return o;}
template<typename T1,typename T2>istream& operator>>(istream&i,pair<T1,T2>&v){return i>>v.fi>>v.se;}
template<typename T1,typename T2>ostream& operator<<(ostream&o,const pair<T1,T2>&v){return o<<v.fi<<","<<v.se;}
template<typename T>bool mins(T& x,const T&y){if(x>y){x=y;return true;}else return false;}
template<typename T>bool maxs(T& x,const T&y){if(x<y){x=y;return true;}else return false;}
template<typename T>ll suma(const v(T)&a){ll res(0);for(auto&&x:a)res+=x;return res;}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
const int MX = 200005;
typedef __int128_t l3;
typedef __uint128_t ul3;
std::ostream &operator<<(std::ostream &o, l3 x) {
  string s;
  bool sg = x < 0;
  ul3 ux = sg?-x:x;
  do {s += '0'+ux%10; ux /= 10;} while (ux);
  if (sg) s += '-';
  reverse(rng(s));
  return o<<s;
}
#include <atcoder/all>
using namespace atcoder;



int main() {
  ll n;
  cin>>n;
  ll ans = n*2;
  if (n%2 == 1) ans = n;
  auto f1 = [&](ll x, ll y) {
    auto p = crt({1,0},{x,y});
    // cerr<<x<<" "<<y<<" "<<p<<endl;
    if (p.fi > 1) mins(ans, p.fi-1);
  };
  auto f2 = [&](ll x, ll y) {
    auto p = crt({0,1},{x,y});
    // cerr<<x<<" "<<y<<" "<<p<<endl;
    if (p.fi > 1) mins(ans, p.fi);
  };
  auto f = [&](ll x) {
    ll y = n/x;
    x *= 2;
    if (gcd(x,y) != 1) return;
    f1(x,y);
    f2(x,y);
  };
  for (ll i = 1; i*i <= n; ++i) {
    if (n%i == 0) {
      f(i);
      f(n/i);
    }
  }
  cout<<ans<<endl;
  return 0;
}






















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

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

int main()
{
  long long n,sum = 1;
  cin>>n;
  vector<long long>sum;
  for(long long i=2;i<=n;i++)
  {
    if(sum%n == 0){
      cout<<i;
      break;}
    sum+=i;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: conflicting declaration 'std::vector<long long int> sum'
    8 |   vector<long long>sum;
      |                    ^~~
a.cc:6:15: note: previous declaration as 'long long int sum'
    6 |   long long n,sum = 1;
      |               ^~~
Language: C++

#include <iostream>
#include <climits>
using namespace std;

long long inv_mod(long long x, long long mod)
{
    long long y = mod;
    long long u = 1;
    long long v = 0;
    while (y)
    {
        long long t = x / y;
        x -= t * y;
        swap(x, y);
        u -= t * v;
        swap(u, v);
    }
    u %= mod;
    if (u < 0)
        u += mod;
    return u;
}

int main(){
    int N;
    long long i;

    cin >> N;

    for(i=2; i < INT_MAX; i++){
        //long long sum = ((1+i) * i)/2; 
        if( inv_mod(((1+i) * i)/2, N) == 0 ){}
            cout << i << endl;
            break;
        }
        
    }
    return 0;
}


Compiler output:
a.cc:38:5: error: expected unqualified-id before 'return'
   38 |     return 0;
      |     ^~~~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
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;
int res;

void spr(int a){
  int b = n/a;if(b == 1 || gcd(a,b) != 1)return;
  int k = atcoder::inv_mod(a,b);
  debug(a,b,k);
  if(a * k == 1){
    k += b;
  }
  mini(res,a*k - 1);
}

int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  cerr << fixed << setprecision(6);
  cin >> n;
  n *= 2;
  res = n;
  for(int x = 1; x * x <= n; x++){
    if(n % x == 0){
      spr(x);
      spr(n/x);
    }
  }
  cout << res << "\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 <iostream>

using namespace std;

int main()
{
  int a, b;
  int sum = 0;

  cout << "Enter two numbers: " << endl;

  cin >> a >> b;
  sum = a + b;

  cout << "The sum of two numbers is: " << sum << endl;

  if (sum < 5)
  {
    for (int i = 0; sum <= 10; i++)
    {
      cout << "Happy Coding " << sum++ << endl;
    }
  }

  else
  {
    cout << "Please enter the numbers in range!" << endl;
  }

  cout << "Happy Coding!" << endl;

  return 0;
}

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

#pragma GCC optimize("O3")
// #ifdef LOCAL
#include <atcoder/all>
// #endif
#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;
int res;

void spr(int a){
  int b = n/a;if(b == 1 || gcd(a,b) != 1)return;
  int k = atcoder::inv_mod(a,b);
  debug(a,b,k);
  if(a * k == 1){
    k += b;
  }
  mini(res,a*k - 1);
}

int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  cerr << fixed << setprecision(6);
  cin >> n;
  n *= 2;
  res = n;
  for(int x = 1; x * x <= n; x++){
    if(n % x == 0){
      spr(x);
      spr(n/x);
    }
  }
  cout << res << "\n";
}


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

#include <iostream>
using namespace std;



int main(){
    int N;
    unsigned long i;

    cin >> N;

    for(i=2; i < INT_MAX; i++){
        if( ( ((1+i) * i)/2 ) % N == 0 ){
            cout << i << endl;
            break;
        }
        
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: 'INT_MAX' was not declared in this scope
   12 |     for(i=2; i < INT_MAX; i++){
      |                  ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C

#include<stdio.h>
int main(void){
  int n, i, sum = 0;
  
  scanf("%d",&n);
  for(i = 1; i <= n; i++){
    sum += i;
    if(sum % n == 0)
      break;
  }
  
  printf("%d", i);

Compiler output:
main.c: In function 'main':
main.c:12:3: error: expected declaration or statement at end of input
   12 |   printf("%d", i);
      |   ^~~~~~
Language: C++

//////////////////////////
//      _        ____   //
//  U  /"\  u U /"___|  //
//   \/ _ \/  \| | u    //
//   / ___ \   | |/__   //
//  /_/   \_\   \____|  //
//   \\    >>  _// \\   //
//  (__)  (__)(__)(__)  //
//  Compro by NULL_CT©  //
//////////////////////////
// STL libs
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <thread>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

// Boost
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/range/irange.hpp>

// ACL
#include <atcoder/all>

#define ALL(LIST) (LIST.begin()), (LIST.end())

using namespace std;
using boost::irange;
using boost::multiprecision::cpp_int;

constexpr int64_t MOD = 1000000007;

vector<int64_t> divisor(const int64_t &_n) {
  vector<int64_t> head, tail;
  for (int64_t i = 1; i * i <= _n; i++) {
    if (_n % i == 0) {
      head.push_back(i);
      if (i * i != _n)
        tail.push_back(_n / i);
    }
  }
  head.insert(head.end(), tail.rbegin(), tail.rend());
  return head;
}

int64_t kadanes(const vector<int64_t> &_ls) {
  int64_t highestMax = 0, currentMax = 0, length = _ls.size();
  for (int64_t i = 0; i < length; i++) {
    currentMax = max(_ls[i], currentMax + _ls[i]);
    highestMax = max(highestMax, currentMax);
  }
  return highestMax;
}

void execution();

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  // cout<<fixed<<setprecision(20);

  execution();
  return 0;
}

//--------------------------------------------------------------
void execution() {
  int n;
  cin>>n;
  cpp_int sum=0;
  for(int i=1;i<=n;i++){
    sum+=i;
    if(sum%n==0){
      cout<<i<<"\n";
      return;
    }
  }
}


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

//////////////////////////
//      _        ____   //
//  U  /"\  u U /"___|  //
//   \/ _ \/  \| | u    //
//   / ___ \   | |/__   //
//  /_/   \_\   \____|  //
//   \\    >>  _// \\   //
//  (__)  (__)(__)(__)  //
//  Compro by NULL_CT©  //
//////////////////////////
// STL libs
#include "atcoder/modint.hpp"
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <thread>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

// Boost
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/range/irange.hpp>

// ACL
#include <atcoder/all>

#define ALL(LIST) (LIST.begin()), (LIST.end())

using namespace std;
using boost::irange;
using boost::multiprecision::cpp_int;

constexpr int64_t MOD = 1000000007;

vector<int64_t> divisor(const int64_t &_n) {
  vector<int64_t> head, tail;
  for (int64_t i = 1; i * i <= _n; i++) {
    if (_n % i == 0) {
      head.push_back(i);
      if (i * i != _n)
        tail.push_back(_n / i);
    }
  }
  head.insert(head.end(), tail.rbegin(), tail.rend());
  return head;
}

int64_t kadanes(const vector<int64_t> &_ls) {
  int64_t highestMax = 0, currentMax = 0, length = _ls.size();
  for (int64_t i = 0; i < length; i++) {
    currentMax = max(_ls[i], currentMax + _ls[i]);
    highestMax = max(highestMax, currentMax);
  }
  return highestMax;
}

void execution();

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  // cout<<fixed<<setprecision(20);

  execution();
  return 0;
}

//--------------------------------------------------------------
void execution() {
  int n;
  cin>>n;
  cpp_int sum=0;
  for(int i=1;i<=n;i++){
    sum+=i;
    if(sum%n==0){
      cout<<i<<"\n";
      return;
    }
  }
}


Compiler output:
a.cc:12:10: fatal error: atcoder/modint.hpp: No such file or directory
   12 | #include "atcoder/modint.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 h, w;
    cin >> h >> w;
    vector<string> grid(h);
    for (int i = 0; i < h; ++i) {
        cin >> grid[i];
    }

    mcf_graph<int, int> P(h * w + 2);
    int s = h * w, t = h * w + 1;
    int fst = 0, cnt = 0;
    const int inf = 1e5;
    for (int i = 0; i < h; ++i) {
        for (int j = 0; j < w; ++j) {
            if(grid[i][j] == 'o') {
                P.add_edge(s, i * w + j, 1, 0);
                fst += i + j;
                cnt++;
            }
            if(grid[i][j] != '#') {
                for (int d = 0; d < 2; ++d) {
                    int x = i + d, y = j + (d ^ 1);
                    if(x >= h || y >= w) continue;
                    if(grid[x][y] == '#') continue;
                    P.add_edge(i * w + j, x * w + y, h * w, 0);
                }
                P.add_edge(i * w + j, t, 1, inf - (i + j));
            }
        }
    }
    int lst = P.flow(s, t).second;
    cout << inf * cnt - lst - fst << 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/mincostflow>
using namespace atcoder;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 100000001

int main() {

	int N, M;
	cin >> N >> M;

	vector<string> S(N);
	rep(i, N)cin >> S[i];

	mcf_graph<int, int> G(N*M + 2);

	int s = N * M;
	int t = N * M + 1;
	int ans = 0;
	rep(i, N) {
		rep(j, M) {
			if (S[i][j] == '#') {
				continue;
			}
			//元、先、容量、コスト
			if (i != N - 1) {//一番下じゃない
				if (S[i + 1][j] != '#') {//行き先が障害物じゃない
					G.add_edge(i*M + j, (i + 1)*M + j, Inf, 0);
				}
			}
			if (j != M - 1) {//一番右じゃない
				if (S[i][j + 1] != '#') {//行き先が障害物じゃない
					G.add_edge(i*M + j, i*M + j + 1, Inf, 0);
				}
			}
			//tに
			G.add_edge(i*M + j, t, 1, (N + M) - (i + j));
			if (S[i][j] == 'o') {
				//sから
				G.add_edge(s, i*M + j, 1, 0);
				ans -= i;
				ans -= j;
				ans += (N + M);
			}
		}
	}

	ans -= G.flow(s, t).second;

	cout << ans << endl;

	return 0;
}


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

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

int main() {

	int N, M;
	cin >> N >> M;

	vector<string> S(N);
	rep(i, N)cin >> S[i];

	mcf_graph<int, int> G(N*M + 2);

	int s = N * M;
	int t = N * M + 1;
	int ans = 0;
	rep(i, N) {
		rep(j, M) {
			if (S[i][j] == '#') {
				continue;
			}
			//元、先、容量、コスト
			if (i != N - 1) {//一番下じゃない
				if (S[i + 1][j] != '#') {//行き先が障害物じゃない
					G.add_edge(i*M + j, (i + 1)*M + j, Inf, 0);
				}
			}
			if (j != M - 1) {//一番右じゃない
				if (S[i][j + 1] != '#') {//行き先が障害物じゃない
					G.add_edge(i*M + j, i*M + j + 1, Inf, 0);
				}
			}
			//tに
			G.add_edge(i*M + j, t, 1, (N + M) - (i + j));
			if (S[i][j] == 'o') {
				//sから
				G.add_edge(s, i*M + j, 1, 0);
				ans -= i;
				ans -= j;
				ans += (N + M);
			}
		}
	}

	ans -= G.flow(s, t).second;

	cout << ans << endl;

	return 0;
}


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

#include <algorithm>
#include <atcoder/mincostflow>
#include <iostream>
#include <vector>

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<string> g(n);
  rep(i, 0, n) cin >> g[i];
  int s = n * m;
  int t = n * m + 1;
  int inf = 1 << 30;
  int ans = 0;

  atcoder::mcf_graph<int, int> mcf(n * m + 2);
  int piece = 0;
  rep(i, 0, n) {
    rep(j, 0, m) {
      if (g[i][j] != '#') {
        if (j + 1 < m && g[i][j + 1] != '#')
          mcf.add_edge(i * m + j, i * m + j + 1, inf, 0);
        if (i + 1 < n && g[i + 1][j] != '#')
          mcf.add_edge(i * m + j, (i + 1) * m + j, inf, 0);
        mcf.add_edge(i * m + j, t, 1, 10000 - (i + j));
      }
      if (g[i][j] == 'o') {
        mcf.add_edge(s, i * m + j, 1, 0);
        ++piece;
        ans -= 10000 - (i + j);
      }
    }
  }
  auto res = mcf.flow(s, t, piece);
  for (auto v : mcf.edges()) {
    if (v.flow > 0 && v.to == t) ans += v.cost;
  }
  cout << -ans << endl;
  return 0;
}


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

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

int main() {
    int n, m;
    cin >> n >> m;
    vector<string> s(n);
    for (int i = 0; i < n; ++i) cin >> s[i];
    
    mcf_graph<int, int> g(n * m + 2);
    int a = n * m, b = a + 1;

    int pre_sum = 0;
    int cost_max = 10000;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < m; ++j) {
            if (s[i][j] == 'o') {
                g.add_edge(a, m * i + j, 1, 0);
                pre_sum += i + j;
            }
            if (s[i][j] != '#') {
                g.add_edge(m * i + j, b, 1, cost_max - (i + j));
                for (int k = 0; k < 2; ++k) {
                    int ni = i + k, nj = j + (1 - k);
                    if (ni >= n || nj >= m) continue;
                    if (s[ni][nj] == '#') continue;
                    g.add_edge(m * i + j, m * ni + nj, INT_MAX, 0);
                }
            }
        }
    }

    auto [flow, cost] = g.flow(a, b);
    int ans = -(cost - flow * cost_max) - pre_sum;
    cout << ans << '\n';
}

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