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

#include <iostream>
#include <vector>
using ll = long long;
#define rep(i, j, n) for (int i = j; i < n; ++i)

class suffix_array {
  int n;
  std::string s;
  std::vector<int> suf;
  std::vector<int> rank;
  std::vector<int> lcp;

public:
  suffix_array() = default;
  suffix_array(const std::string& _s)
    : n(_s.length()), s(_s), suf(n), rank(n), lcp(n) {
    std::iota(suf.begin(), suf.end(), 0);
    for (int i = 0; i < n; ++i) rank[i] = s[i];
    int itr = 1;
    auto cmp = [&](int a, int b) {
      if (rank[a] != rank[b]) return rank[a] < rank[b];
      int l = a + itr < n ? rank[a + itr] : -1;
      int r = b + itr < n ? rank[b + itr] : -1;
      return l < r;
    };
    std::vector<int> buff(n);
    for (; itr < n; itr <<= 1) {
      std::sort(suf.begin(), suf.end(), cmp);
      buff[suf[0]] = 0;
      for (int i = 1; i < n; ++i)
        buff[suf[i]] = buff[suf[i - 1]] + cmp(suf[i - 1], suf[i]);

      buff.swap(rank);
    }
    for (int i = 0; i < n; ++i) rank[suf[i]] = i;

    int now = 0;
    for (int i = 0; i < n; ++i) {
      int x = rank[i];
      if (x == n - 1) continue;
      int y = x + 1;
      int j = suf[y];
      if (0 < now) now--;
      for (; now + std::max(i, j) < n; now++)
        if (s[i + now] != s[j + now]) break;

      lcp[x] = now;
    }
  }

  bool find(std::string& t) {
    int ng = -1, ok = (int)s.length() - 1;
    while (ok - ng > 1) {
      int mid = (ok + ng) / 2;
      if (s.substr(suf[mid], t.length()) < t)
        ng = mid;
      else
        ok = mid;
    }
    return s.substr(suf[ok], t.length()) == t;
  }

  std::vector<int> get_suf() const { return suf; }
  std::vector<int> get_lcp() const { return lcp; }
};

int main() {
  std::string s;
  std::cin >> s;
  ll n = s.length();
  suffix_array sa(s);
  ll ans = n * (n + 1) / 2;
  for (int x : sa.get_lcp()) ans -= x;
  std::cout << ans << '\n';
  return 0;
}

Compiler output:
a.cc: In constructor 'suffix_array::suffix_array(const std::string&)':
a.cc:17:10: error: 'iota' is not a member of 'std'
   17 |     std::iota(suf.begin(), suf.end(), 0);
      |          ^~~~
a.cc:28:12: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   28 |       std::sort(suf.begin(), suf.end(), cmp);
      |            ^~~~
      |            qsort
Language: C++

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

using namespace std;
using namespace atcoder;

#define REP(i,m,n) for(int i=(m);i<(n);++i)
#define rep(i,n) REP(i,0,n)

int main(){
    static char buf[500000+1];
    scanf("%s",&buf);
    string s=buf;
    vector<int> sa=suffix_array(s);
    long long ans=1LL*s.size()*(s.size-1)/2;

    for(auto x:lcp_array(s,sa)){
        ans-=x;
    }

    printf("%lld\n",ans);

    return 0;
}

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

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
 
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vvvi = vector<vector<vector<int>>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
using vs = vector<string>;
using vb = vector<bool>;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n) - 1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define REPS(c, s) for (char c : s)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REV(c) reverse(ALL(c))
#define sz(v) (int)v.size()
#define endl '\n'
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
template<class T> inline void prn(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << ' ';}
template<class T> inline void printv(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << (i == n - 1 ? endl : ' ');}
template<class T> inline void printvv(vector<vector<T>>& v) {for (auto u : v) printv(u);}
template<class T> inline void printlnv(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << endl;}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
 
void solve();
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(numeric_limits<double>::max_digits10);
    solve();
    return 0;
}

void solve() {
    string s;
    cin >> s;
    vi sa = suffix_array(s);
    vi lcp = lcp_array(s, sa);
    ll ans = (ll)sz(s) * (ll)(sz(s) + 1) / 2LL;
    for (auto x : lcp) ans -= x;
    cout << ans << endl;
}

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

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define ll long long
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define rep1(i, n) FOR(i, 1, n+1)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define whole(x) (x).begin(),(x).end()
#define rwhole(x) (x).rbegin(), (x).rend()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define P pair<int, int>
#define debug(var) cerr << "[" << #var << "] " << var << endl
template<typename T1, typename T2>
bool chmax(T1 &a,T2 b){if(a<b){a=b;return true;}else return false;}
template<typename T1, typename T2>
bool chmin(T1 &a,T2 b){if(a>b){a=b;return true;}else return false;}
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define pr(s) cout << (s) << '\n'
const ll mod = 1000000007;
const int dx[] = {-1,0,1,0};
const int dy[] = {0,-1,0,1};
const int INF = 1001001001;
const ll INFll = 1E+18;


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    string s;
    cin >> s;
    auto sa = suffix_array(s);
    ll n = s.size();
    ll ans = n*(n+1)/2;
    auto lcp = lcp_array(s, sa);
    for (auto x: lcp) {
        //debug(x);
        ans -= x;
    }
    pr(ans);
    
    
    return 0;
}


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

#include <iostream>
#include <string>
#include <vector>
#include <atcoder/all>
typedef long long ll;
using namespace std;
using namespace atcoder;
int main(){
	string s; cin >> s;
	auto sa = suffix_array(s);
    auto lcp = lcp_array(s, sa);
	ll n = s.size();
	ll ans = n * (n+1) / 2;
	for(int i=0; i<n-1; i++) ans -= lcp[i];
	cout << ans << "\n";
}

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

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

int main() {
	string s; cin >> s;
	ll n = s.size();
	vector<int> sa = suffix_array(s);
	vector<int> lcp = lcp_array(s, sa);
	ll ans = n * (n+1) / 2;
	for (int l : lcp) ans -= l;
	cout << ans << endl;
	return 0;
}

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

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

using namespace std;
using ll = long long;


int main()
{
	string s; cin >> s; int n = s.size();
	auto sa = atcoder::suffix_array(s);
	auto lcp= atcoder::lcp_array(s, sa);

	ll ans = 1;
	for(int i = 0; i < n - 1; i++) {
		ans += (n - sa[i + 1]) - lcp[i];
	}
	cout << ans << endl;

}

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

#include "atcoder/all"
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <vector>

const int MOD = 1e9 + 7;
const int iINF = 2147483647 / 2;
const long long int llINF = 9223372036854775807 / 2;

using namespace std;
using namespace atcoder;
using ll = long long int;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;

typedef pair<ll, ll> pll;
bool paircomp(const pll &a, const pll &b) {
  if (a.first == b.first)
    return a.second < b.second;
  return a.first < b.first;
}

#define REP(i, n) for (ll i = 0; i < (n); i++)
#define RREP(i, n) for (ll i = (n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define AUTO(i, m) for (auto &i : m)
#define ALL(a) (a).begin(), (a).end()
#define MAX(vec) *std::max_element(vec.begin(), vec.end())
#define MIN(vec) *std::min_element(vec.begin(), vec.end())
#define ARGMAX(vec)                                                            \
  std::distance(vec.begin(), std::max_element(vec.begin(), vec.end()))
#define ARGMIN(vec)                                                            \
  std::distance(vec.begin(), std::min_element(vec.begin(), vec.end()))
#define REV(T) greater<T>()
#define PQ(T) priority_queue<T, vector<T>, greater<T>>
#define VVL(a, b, c) vector<vector<ll>>(a, vector<ll>(b, c))
#define VV(T, a, b, c) vector<vector<T>>(a, vector<T>(b, c))
#define VVVL(a, b, c, d)                                                       \
  vector<vector<vector<ll>>>(a, vector<vector<ll>>(b, vector<ll>(c, d)))
#define VVV(T, a, b, c, d)                                                     \
  vector<vector<vector<T>>>(a, vector<vector<T>>(b, vector<T>(c, d)))
#define SP(a) fixed << setprecision(a)
#define SQRT(a) sqrt((long double)(a))
#define DPOW(a, b) pow((long double)(a), (long double)(b))
#define UNIQUE(vec)                                                            \
  do {                                                                         \
    sort(ALL((vec)));                                                          \
    (vec).erase(std::unique(ALL((vec))), (vec).end());                         \
  } while (0)

ll POW(ll n, ll m) {
  if (m == 0) {
    return 1;
  } else if (m % 2 == 0) {
    ll tmp = POW(n, m / 2);
    return (tmp * tmp);
  } else {
    return (n * POW(n, m - 1));
  }
}

int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string S;
  cin >> S;
  ll ans = (S.size() * (S.size() + 1)) / 2;
  AUTO(a, lcp_array(S, suffix_array(S))) { ans -= a; }
  cout << ans << endl;

  return 0;
}


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

#include "bits/stdc++.h"
using namespace std;
#include "atcoder/all"
using namespace atcoder;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
#define RREP(i, n) for (int i = (int)n - 1; i >= 0; --i)
#define FOR(i, s, n) for (int i = s; i < (int)n; ++i)
#define RFOR(i, s, n) for (int i = (int)n - 1; i >= s; --i)
#define ALL(a) a.begin(), a.end()
#define IN(a, x, b) (a <= x && x < b)
template<class T>istream&operator >>(istream&is,vector<T>&vec){for(T&x:vec)is>>x;return is;}
template<class T>inline void out(T t){cout << t << "\n";}
template<class T,class... Ts>inline void out(T t,Ts... ts){cout << t << " ";out(ts...);}
template<class T>inline bool CHMIN(T&a,T b){if(a > b){a = b;return true;}return false;}
template<class T>inline bool CHMAX(T&a,T b){if(a < b){a = b;return true;}return false;}
constexpr int INF = 1e18;



signed main(){
	string s;
	cin >> s;
	
	auto sa = suffix_array(s);
	int ans = s.size() * (s.size() + 1) / 2;
	for(auto x: lcp_array(s, sa)) {
		ans -= x;
	}
	out(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 <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <queue>
#include <bitset>
#include <stack>
#include <functional>

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

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

#define rep_(i, a_, b_, a, b, ...) for (int i = (a), i##_len = (b); i < i##_len; ++i)
#define rep(i, ...) rep_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define reprev_(i, a_, b_, a, b, ...) for (int i = (b-1), i##_min = (a); i >= i##_min; --i)
#define reprev(i, ...) reprev_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define all(x) (x).begin(), (x).end()
template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
#define fls(x) (64 - __builtin_clzll(x))
#define pcnt(x) __builtin_popcountll(x)
using namespace std;

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

int main (void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    string s; cin >> s;
    ll ans = (ll)s.size() * (s.size() + 1) / 2;
    for (int x : lcp_array(s, suffix_array(s))) ans -= x;
    cout << ans << "\n";
    /***************************************************/
    /* Submit this code from the browser if using ACL! */
    /***************************************************/
    return 0;
}

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

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

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

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

int main(){
   string s; cin>>s; int n=s.size();
   auto sa=atcoder::suffix_array(s);
   auto lcp=atcoder::lcp_array(s,sa);
   ll res=1LL*n*(n+1)>>1;
   for(auto& x:lcp)res-=x;
   cout<<res<<endl;
   return 0;
}

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

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

using namespace std;
using namespace atcoder;

int main(){
    string S;
    cin>>S;
    vector<long long> vsa=suffix_array(S);
    vector<long long> vlc=lcp_array(S,vsa);

    long long sum=0;
    for(long long i=0;i<vlc.size();i++){
        sum+=(i+1)-vlc[i];
    }
    cout<<sum+S.size()<<endl;
}


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

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

using namespace std;
using namespace atcoder;

int main(){
    string S;
    cin>>S;
    vector<int> vsa=suffix_array(S);
    vector<int> vlc=lcp_array(S,vsa);

    int sum=0;
    for(int i=0;i<vlc.size();i++){
        sum+=(i+1)-vlc[i];
    }
    cout<<sum+S.size()<<endl;
}


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

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
int main(){
    string S;
    cin >> S;
    vector<int> sa = suffix_array(S);
    vector<int> lcp = lcp_array(S, sa);
    long long N = (long long)S.size();
    cout << N * (N + 1) / 2 - accumulate(lcp.begin(), lcp.end(), 0LL) << 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/string>
using namespace std;
using namespace atcoder;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int mod = 1e+9 + 7;
const int INF = 1 << 30;
/* global variables */
/* funciton */
/* main */
int main() {
    static char buf[500'001];
    scanf("%s", buf);
    string s = buf;
    vector<int> sa = suffix_array(s);
    long long answer = 1LL * s.size() * (s.size() + 1) / 2;
    for (auto x : lcp_array(s, sa)) {
        answer -= x;
    }
    printf("%lld\n", answer);
    return 0;
}

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

#include<bits/stdc++.h>
#include <atcoder/all>
#define ll long long int
#define vec vector<ll>
#define mat vector<vector<ll>>

using namespace std;
using namespace atcoder;

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

int main(){

  string s;
  cin >> s;
  
  vector<int> a=suffix_array(s);
  for(ll i=0;i<a.size();i++)cout << a[i] << endl;
  ll ans=(s.size()+1)*s.size()/2;
  cout << ans << endl;
  for(auto x:lcp_array(s,a)){
    ans-=x;
  }
  cout << ans << endl;


}

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

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

using namespace std;
using namespace atcoder;

int main()
{
  string s;
  cin >> s;
  int n = s.size();
  vector<int> lcp = lcp_array(s, suffix_array(s));
  cout << 1ll * n * (n + 1) / 2 - accumulate(s.begin(), s.end(), 0LL);
}

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

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

using namespace std;
using namespace atcoder;

int main() {
    static char buf[500'001];
    scanf("%s", buf);
    string s = buf;
    vector<int> sa = suffix_array(s);
    long long answer = 1LL * s.size() * (s.size() + 1) / 2;
    for (auto x : lcp_array(s, sa)) {
        answer -= x;
    }
    printf("%lld\n", answer);
    return 0;
}

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

#include <atcoder/segtree>
#include <cstdio>
#include <vector>
 
using namespace std;
using namespace atcoder;
 
int op(int a, int b) { return max(a, b); }
 
int e() { return -1; }
 
int main() {
    int n, q;
    scanf("%d %d", &n, &q);
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &(a[i]));
    }
 
    segtree<int, op, e> seg(a);
 
    for (int i = 0; i < q; i++) {
        int t;
        scanf("%d", &t);
        if (t == 1) {
            int x, v;
            scanf("%d %d", &x, &v);
            x--;
            seg.set(x, v);
        } else if (t == 2) {
            int l, r;
            scanf("%d %d", &l, &r);
            l--;
            printf("%d\n", seg.prod(l, r));
        }
    }
}

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

#include "atcoder/all"
#include <cstdio>
#include <vector>

using namespace std;
using namespace atcoder;

int op(int a, int b) { return max(a, b); }

int e() { return -1; }

int target;

bool f(int v) { return v < target; }

int main() {
    int n, q;
    scanf("%d %d", &n, &q);
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &(a[i]));
    }

    segtree<int, op, e> seg(a);

    for (int i = 0; i < q; i++) {
        int t;
        scanf("%d", &t);
        if (t == 1) {
            int x, v;
            scanf("%d %d", &x, &v);
            x--;
            seg.set(x, v);
        } else if (t == 2) {
            int l, r;
            scanf("%d %d", &l, &r);
            l--;
            printf("%d\n", seg.prod(l, r));
        } else if (t == 3) {
            int p;
            scanf("%d %d", &p, &target);
            p--;
            printf("%d\n", seg.max_right<f>(p) + 1);
        }
    }
}


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

#include <atcoder/segtree>
#include <cstdio>
#include <vector>

using namespace std;
using namespace atcoder;

int op(int a, int b) { return max(a, b); }

int e() { return -1; }

int target;

bool f(int v) { return v < target; }

int main() {
    int n, q;
    scanf("%d %d", &n, &q);
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &(a[i]));
    }

    segtree<int, op, e> seg(a);

    for (int i = 0; i < q; i++) {
        int t;
        scanf("%d", &t);
        if (t == 1) {
            int x, v;
            scanf("%d %d", &x, &v);
            x--;
            seg.set(x, v);
        } else if (t == 2) {
            int l, r;
            scanf("%d %d", &l, &r);
            l--;
            printf("%d\n", seg.prod(l, r));
        } else if (t == 3) {
            int p;
            scanf("%d %d", &p, &target);
            p--;
            printf("%d\n", seg.max_right<f>(p) + 1);
        }
    }
}


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

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

#define rep(i,n) for(int i=0; i<(n); i++)
#define rrep(i,n) for(int i=(n)-1; i>=0; i--)
#define FOR(i,a,b) for(int i=(a); i<(b); i++)
#define RFOR(i,a,b) for(int i=(b-1); i>=(a); i--)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define pb push_back
using ll = long long;
using D = double;
using LD = long double;
using P = pair<int, int>;
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; }

int op(int a, int b) {return max(a,b);}

int e() {return -1;}

int target;
bool f(int v) {return v < target;}

int main(){
    int n,q; cin >> n >> q;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    segtree<int, op, e> seg(a);

    rep(_, q){
        int t; cin >> t;
        if(t == 1){
            int x,v; cin >> x >> v; x--;
            seg.set(x, v);
        }
        else if(t == 2){
            int l,r; cin >> l >> r; l--;
            cout << seg.prod(l,r) << endl;
        }
        else if(t == 3){
            int p; cin >> p >> target;
            cout << seg.max_right<f>(p)+1;
        }
    }
}


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

#include <iostream>
#include <vector>
#include <array>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <string>
#include <sstream>
#include <algorithm>
#include <random>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <cassert>
#include <climits>
#include <bitset>
#include <functional>
#include <iomanip>
#include <random>

#include <atcoder/all>

#define FOR_LT(i, beg, end) for (decltype(end) i = beg; i < end; i++)
#define FOR_LE(i, beg, end) for (decltype(end) i = beg; i <= end; i++)
#define FOR_DW(i, beg, end) for (decltype(beg) i = beg; end <= i; i--)
#define REP(n)              for (decltype(n) repeat_index = 0; repeat_index < n; repeat_index++)

using namespace std;

int64_t e() {
	return 0;
}

int64_t op(int64_t lhs, int64_t rhs)
{
	return max(lhs, rhs);
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout << fixed << setprecision(20);

	int n, q; cin >> n >> q;
	atcoder::segtree<int64_t, op, e> segt(n);
	FOR_LT(i, 0, n) {
		int64_t a; cin >> a;
		segt.set(i, a);
	}

	REP(q) {
		int op; cin >> op;
		if (op == 1) {
			int64_t x, a; cin >> x >> a;
			x--;
			asset(0 <= x);
			assert(x < n);
			//segt.set(x, a);
		}
		if (op == 2) {
			int l, r; cin >> l >> r;
			cout << segt.prod(l - 1, r) << endl;;
		}
		if (op == 3) {
			int64_t x, v; cin >> x >> v; x--;
			int64_t ans = segt.max_right(x, [&](int64_t val) { return (val < v); });
			cout << ans + 1 << endl;
		}
	}

	return 0;
}

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

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

using namespace std;
using ll = long long;
#define LSG(S,F) S::value_type,S::op,S::e,F::value_type,F::mapping,F::composition,F::id //S: 取得 F: 更新
#define SG(S) S::value_type, S::op, S::e

template<class T> class RMinQ { public:
	using value_type = T;
	static T op(T l, T r) {return min(l, r);}
	static T e(){return (T)1e9;}
};
template<class T> class RMaxQ { public:
using value_type = T;
	static T op(T l, T r){ return max(l, r); }
	static T e(){return (T)-1e9;}
};
template<class T> class RSumQ { public:
	static T op(T l, T r){ return l + r; }
	static T e(){return T(0);}
};



int main()
{
	int n, q; cin >> n >> q;
	vector<int> a(n);
	for(int i = 0; i < n; i++)cin >> a[i];
	atcoder::segtree<SG(RMaxQ<int>)> tree(a);

	for(int i = 0; i < q; i++) {
		int t; cin >> t;
		if(t == 1) {
			int x, y; cin >> x >> y; x--;
			tree.set(x, y);
		}
		if(t == 2) {
			int l, r; cin >> l >> r;
			cout << tree.prod(l - 1, r) << endl;
		}
		if(t == 3) {
			int x, v; cin >> x >> v;
			x--;
			cout << tree.max_right(x, [&](int prod) {return prod < v;}) + 1 << endl;
		}
	}
	

}

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

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

ll f_max(ll a, ll b) {
    return max(a,b);
}
ll f_e() {
    return -(1LL<<60);
}

ll solve() {
    ll N, Q, t, x, v, l, r, a;
    cin >> N >> Q;
    atcoder::segtree<ll,f_max,f_e> sg(N);
    for ( int i = 0; i < N; i++ ) {
        cin >> a;
        sg.set(i, a);
    }
    auto f_v = [&](ll ma) {return v>ma;};
    vector<ll> ans;
    for ( int q = 0; q < Q; q++ ) {
        cin >> t;
        switch ( t ) {
            case 1:
                cin >> x >> v;
                x--;
                sg.set(x,v);
                break;
            case 2:
                cin >> l >> r;
                l--, r--;
                ans.push_back(sg.prod(l, r+1));
                break;
            case 3:
                cin >> x >> v;
                x--;
                int j = sg.max_right(x, f_v) + 1;
                ans.push_back(j);
                break;
        }
    }

    for ( ll an : ans ) {
        cout << an << "\n";
    }
    return 0;
}

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

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

#include <atcoder/segtree>
#include <iostream>
#include <vector>
#define rep(i, j, n) for (int i = j; i < n; ++i)
using namespace std;

int b;
bool f(int a) { return a < b; }

int main() {
    int n, q, t, x, v;
    cin >> n >> q;
    vector<int> a(n);
    for (int& z : a) cin >> z;
    auto op = [](int a, int b) { return std::max(a, b); };
    auto e = []() { return 0; };
    atcoder::segtree<int, op, e> st(a);

    rep(i, 0, q) {
        cin >> t >> x >> v;
        --x;
        if (t == 1)
            st.set(x, v);
        else if (t == 2)
            cout << st.prod(x, v) << '\n';
        else {
            b = v;
            cout << st.max_right<f>(x) + 1 << '\n';
        }
    }

    return 0;
}


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

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

int op(int a,int b){return max(a,b);}

int e(){return -1;}

int target;

bool f(int v){return v<target;}


int main() {
  long long N,Q;
	cin>>N>>Q;
	vector<long long> a(N);
	rep(i,N)cin>>a[i];
	segtree<long long,op,e> seg(a);
	rep(i,Q){
		int T;
	  cin>>T;
		if(T==1){
			long long X,V;
			cin>>X>>V;
			X--;
			seg.set(X,V);
		}else if(T==2){
			long long X;
			cin>>X>>target;
			X--;
			cout<<seg.prod(X,target)<<"\n";
		}else{
			long long X,V;
		  cin>>X>>V;
			X--;
			cout<<seg.max_right<f>(X)+1<<"\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 <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define fi first
#define se second
long long mo = 1000000007;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
typedef pair<ll,Pll> PlP;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<class A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}cout << "\n";}
ld PI=3.14159265358979323846;
using namespace atcoder;

int op(int a, int b) {
    return max(a, b);
}

int e() {
    return (int)(-1);
}
int target;
bool f(int v){
    return v < target;
}

int main(){
    ll N,Q;
    cin >> N >> Q;
    vector<int> A(N);
    segtree<int, op, e> seg(N);
    rep(i,N){
        cin >> A[i];
        seg.set(i,A[i]);
    }
    vector<int> a(Q),b(Q),c(Q);
    rep(i,Q){
        cin >> a[i] >> b[i] >> c[i];
    }
    int t,x,v;
    rep(i,Q){
        t = a[i];
        x = b[i];
        v = c[i];
        if(t==1){
            x--;
            seg.set(x,v);
        }else if(t==2){
            x--;
            cout << seg.prod(x,v) << endl;
        }else{
            target = v;
            x--;
            cout << seg.max_right<f>(x) + 1 << endl;
        }
    }
}

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

#include <bits/stdc++.h>

#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
constexpr int INF = 1e9;
constexpr long long LINF = 1e18;
constexpr long long MOD = 1e9 + 7;

int op(int a, int b) {
    return max(a, b);
}

int e() {
    return -INF;
}

int v;
bool f(int x) {
    return x < v;
}

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    int n, q;
    cin >> n >> q;
    vector<int> a(n);
    rep(i, n) {
        cin >> a[i];
    }
    segtree<int, op, e> seg(a);
    int t, x, l, r;
    rep(i, q) {
        cin >> t;
        if (t == 1) {
            cin >> x >> v;
            x--;
            seg.set(x, v);
        } else if (t == 2) {
            cin >> l >> r;
            l--;
            cout << seg.prod(l, r) << endl;
        } else {
            cin >> x >> v;
            x--;
            cout << seg.max_right<f>(x) + 1 << endl;
        }
    }
    return 0;
}

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


#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <map>
#include <algorithm>
#include <string>
#include <vector> 
#include <numeric>
#include <cmath>
#include <queue>
#include <iomanip>
#include <functional>
#include <atcoder/all>

#define CHMAX(a,b) a = std::max(a,b)
#define CHMIN(a,b) a = std::min(a,b)
#define MAXMIN(a,b,c) std::max(a,min(b,c))
#define CHABS(a) a = std::abs(a) 
#define COUT(a) std::cout << a << std::endl
#define CERR(a) std::cerr << a << std::endl
#define FOR(n) for(lli i = 0; i < n; i++)

using namespace std;
using namespace atcoder;


int op(int a, int b) { return max(a, b); }

int e() { return -1; }

int target;

bool f(int v) { return v < target; }

int main() {
    int n, q;
    scanf("%d %d", &n, &q);
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &(a[i]));
    }

    segtree<int, op, e> seg(a);

    for (int i = 0; i < q; i++) {
        int t;
        scanf("%d", &t);
        if (t == 1) {
            int x, v;
            scanf("%d %d", &x, &v);
            x--;
            seg.set(x, v);
        }
        else if (t == 2) {
            int l, r;
            scanf("%d %d", &l, &r);
            l--;
            printf("%d\n", seg.prod(l, r));
        }
        else if (t == 3) {
            int p;
            scanf("%d %d", &p, &target);
            p--;
            printf("%d\n", seg.max_right<f>(p) + 1);
        }
    }
}

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

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

template<class T>
struct SegTree {
  using FX = function<T(T, T)>;
  int n, _n;
  FX fx;
  const T ex;
  vector<T> dat;
  SegTree(int n_, FX fx_, T ex_):fx(fx_), ex(ex_), n(1), _n(n_) {
    while(n < n_) n <<= 1;
    dat.assign((n<<1)-1, ex);
  }
  SegTree(vector<T> &v, FX fx_, T ex_):fx(fx_), ex(ex_), n(1), _n(int(v.size())) {
    int n_ = int(v.size());
    while(n < n_) n <<= 1;
    dat.assign((n<<1)-1, ex);
    copy(v.begin(), v.end(), dat.begin()+n-1);
    for(int i = n-2; i >= 0; i--) dat[i] = fx(dat[chld(i)], dat[chrd(i)]);
  }
  inline int chld(int k) {return (k<<1)+1;}
  inline int chrd(int k) {return (k<<1)+2;}
  void update(int i, T x) {
    i += n-1;
    dat[i] = x;
    while(i) {
      i = (i-1)>>1;
      dat[i] = fx(dat[chld(i)], dat[chrd(i)]);
    }
  }
  inline T query(int a, int b) {return query(a, b, 0, 0, n);}
  T query(int a, int b, int k, int l, int r) {
    if(r <= a || b <= l) return ex;
    if(a <= l && r <= b) return dat[k];
    T vl = query(a, b, chld(k), l, (l+r)>>1);
    T vr = query(a, b, chrd(k), (l+r)>>1, r);
    return fx(vl, vr);
  }
  template<class F>
  int max_right(int l, F f) {
    assert(f(ex));
    if(l == _n) return _n;
    l += n;
    T now = ex;
    do {
      while(~l&1) l >>= 1;
      if(!f(fx(now, dat[l-1]))) {
        while(l < n) {
          l <<= 1;
          if(f(fx(now, dat[l-1]))) {
            now = fx(now, dat[l++ - 1]);
          }
        }
        return l-n;
      }
      now = fx(now, dat[l++ - 1]);
    } while((l & -l) != l);
    return _n;
  }
  template<class F>
  int min_left(int r, F f) {
    assert(f(ex));
    if(r == 0) return 0;
    r += n;
    T now = ex;
    do {
      r--;
      while(r > 1 and r&1) r >>= 1;
      if(!f(fx(dat[r-1], now))) {
        while(r < n) {
          r = chld(r);
          if(f(fx(dat[r-1], now))) {
            now = fx(dat[--r], now);
          }
        }
        return r+1-n;
      }
      now = fx(dat[r-1], now);
    } while((r & -r) != r);
    return 0;
  }
  const T &operator[](int idx) const {return dat[idx+n-1];}
};



int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  vector<int> a(n);
  for(int i = 0; i < n; i++) scanf("%d", &a[i]);
  SegTree<int> seg(a, [](int i, int j)->int {return max(i, j);}, -INF);
  while(q--) {
    int type, x, y;
    scanf("%d%d%d", &type, &x, &y);
    if(type == 1) {
      seg.update(x-1, y);
    }
    if(type == 2) {
      printf("%d\n", seg.query(x-1, y));
    }
    if(type == 3) {
      printf("%d\n", seg.max_right(x-1, [y](int X)->bool{return X < y;})+1);
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:94:67: error: 'INF' was not declared in this scope
   94 |   SegTree<int> seg(a, [](int i, int j)->int {return max(i, j);}, -INF);
      |                                                                   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define rep(i,n) for (long long i = 0; i < (n); ++i)
using ll = long long;
using P = pair<ll,ll>;
using vec = vector<ll>;
using vecp = vector<P>;
using mat = vector<vec>;
using matp = vector<vecp>;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define all(v) v.begin(), v.end()

ll op(ll a, ll b) {
    return max(a, b);
}

ll e() {
    return (ll)(0);
}
ll d;
bool f(ll x){
  return x<d;
}

int main(){
  ll N,Q;
  cin >> N >> Q;
  vec A(N);
  rep(i,N){
    cin >> A.at(i);
  }
  
  segtree<ll, op, e> seg(A);
  rep(i,Q){
    ll a,b,c;
    cin >> a >> b >> c;
    b--;
    if(a==1){
      seg.set(b,c);
    }else if(a==2){
      cout << seg.prod(b,c) << endl;
    }else{
      d=c;
      cout << seg.max_right<f>(b)+1 << 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>
using namespace std;
using namespace atcoder;

#define STRING(str) #str

template <typename T >
void print_vec_1d(vector<T> x, string name) {
	cout << name << endl;
	cout << "[ ";
	for (int i=0;i<x.size();i++) {
		cout << x[i];
		if (i != x.size()-1) cout << ", ";
		else cout << " ]" << endl;
	}
}

int op(int a, int b) {
	return max(a, b);
}

int e() {
	return int(-1);
}

int target = 1;

bool f(int X) {
	return X<target;
}

int main() {
	int N, Q;
	cin >> N >> Q;
	segtree<int, op, e> seg(N);
	for (int i=0;i<N;i++) {
		int A;
		cin >> A;
		seg.set(i, A);
	}

	for (int i=0;i<Q;i++) {
		int T;
		cin >> T;
		if (T == 1) {
			int X, V;
			cin >> X >> V;
			seg.set(X-1, V);
		} else if (T == 2) {
			int L, R;
			cin >> L >> R;
			cout << seg.prod(L-1, R) << endl;
		} else { // T == 3
			int X, V;
			cin >> X >> V;
			target = V;
			cout << seg.max_right<f>(X)+1 << endl;
		}
	}
}

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

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

using namespace std;
using namespace atcoder;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> P;
typedef string str;
typedef vector<P> vp;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef dsu uf;
typedef fenwick_tree<ll> fw;

const ll mod=1e9+7;
const ll inf=1e18;

#define rep(i,m,n) for(ll i=m;i<n;i++)
#define repr(i,m,n) for(ll i=m-1;i>=n;i--)
#define fi first
#define se second
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define eb(x) emplace_back(x)
#define pb(x) pop_back(x)
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define pc(x) __builtin_popcount(x)
#define gll greater<ll>()


int op(int a, int b) {return max(a, b);}
 
int e() {return -1;}
 
int x;
bool f(int b) {return b < x;};
 

void solve(){
 int n,q;
  cin >> n >> q;
 vector<int> a(n);
  rep(i,0,n) cin >> a[i];
  
  segtree<int, op, e> st(a);
  while(q--){
   ll t,l,r;
    cin >> t >> l >> r;
    if(t==1) st.set(l-1,r);
    else if(t==2) cout << st.prod(l-1, r) << endl;
    else {
      x = r;
      cout << st.max_right<f>(l - 1) + 1 << endl;
    }
    
  }
}
int main(){
   cin.tie(nullptr);
  ios::sync_with_stdio(false);
  solve();
}

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

#include <bits/stdc++.h>
using namespace std;
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;
}
#define DEBUG
#ifdef DEBUG
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    os << '(' << p.first << ',' << p.second << ')';
    return os;
}
template <class T> ostream &operator<<(ostream &os, const vector<T> &v) {
    os << '{';
    for(int i = 0; i < (int)v.size(); i++) {
        if(i) {
            os << ',';
        }
        os << v[i];
    }
    os << '}';
    return os;
}
void debugg() { cerr << endl; }
template <class T, class... Args>
void debugg(const T &x, const Args &... args) {
    cerr << " " << x;
    debugg(args...);
}
#define debug(...)                                                             \
    cerr << __LINE__ << " [" << #__VA_ARGS__ << "]:", debugg(__VA_ARGS__)
#define dump(x) cerr << __LINE__ << " " << #x << " = " << (x) << endl
#else
#define debug(...) (void(0))
#define dump(x) (void(0))
#endif

struct Setup {
    Setup() {
        cin.tie(0);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(15);
    }
} __Setup;

using ll = long long;
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
const double EPS = 1e-7;
const int INF = 1 << 30;
const ll LLINF = 1LL << 60;
constexpr int MOD = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

//-------------------------------------

#include <atcoder/segtree>
using namespace atcoder;

int target;

bool f(int x) { return x < target; }

int main() {
    int N, Q;
    cin >> N >> Q;
    vector<int> a(N);
    for(int i = 0; i < N; i++) {
        cin >> a[i];
    }
    auto e = +[]() { return -INF; };
    auto op = +[](int x, int y) { return max(x, y); };
    segtree<int, op, e> seg(a);

    while(Q--) {
        int t;
        cin >> t;
        if(t == 1) {
            int x, v;
            cin >> x >> v;
            x--;
            seg.set(x, v);
        } else if(t == 2) {
            int l, r;
            cin >> l >> r;
            l--;
            cout << seg.prod(l, r) << "\n";
        } else {
            int x;
            cin >> x >> target;
            x--;
            cout << seg.max_right<f>(x) + 1 << "\n";
        }
    }
}


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

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

using namespace std;

using namespace atcoder;

int op(int a,int b){
    return max(a,b);
}

int e(){
    return -1;
}

int target;

bool f(int v){
    return v<target;
}

int main(){
    int n,q;
    cin >> n >> q;
    vector<int> a(n);
    rep(i,n){
        cin >> a[i];
    }
    segtree<int,op,e> seg(a);
    
    rep(i,q){
        int t;
        cin >> t;
        if(t==1){
            int x,v;
            cin >> x >> v;
            x--;
            seg.set(x,v);
        }
        if(t==2){
            int l,r;
            cin >> l >> r;
            l--;
            cout << seg.prod(l,r) << endl;
        }
        if(t==3){
            int x,v;
            cin >> x >> v;
            x--;
            target=v;
            cout << seg.max_left<f>(x) << endl;
        }
    }
    return 0;
}

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

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

using namespace std;
using ll = long long;

template<class T> class RMaxQ { public:
using value_type = T;
	static T op(T l, T r){ return max(l, r); }
	static T id(){return (T)-1e9;}
};
int target;

bool f(int v) { return v < target; }


int main()
{
	int n, q; cin >> n >> q;
	vector<int> a(n);
	for(int i = 0; i < n; i++)cin >> a[i];
	atcoder::segtree<int, RMaxQ<int>::op, RMaxQ<int>::id> tree(a);

	for(int i = 0; i < q; i++) {
		int t; cin >> t;
		if(t == 1) {
			int x, v; cin >> x >> v;
			x--;
			tree.set(x, v);
		}
		if(t == 2) {
			int l, r; cin >> l >> r;
			l--;
			cout << tree.prod(l, r) << endl;
		}
		if(t == 3) {
			int x; cin >> x >> target;
			x--;
			cout << tree.max_right<f>(x) + 1 << endl;
			
		}
	}
	
}

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