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

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

using namespace std;

typedef long long ll;
#define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i)
#define ALL(v) (v).begin(),(v).end()
#define CLR(t,v) memset(t,(v),sizeof(t))
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>&a){return os<<"("<<a.first<<","<<a.second<< ")";}
template<class T>void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<<endl;}
template<class T>void chmin(T&a,const T&b){if(a>b)a=b;}
template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}

ll nextLong() { ll x; scanf("%lld", &x); return x;}

using mint = atcoder::modint998244353;

const int MAX_N = 312345;
mint power_ten[MAX_N];

struct S {
  mint a;
  int size;
};
S op(S l, S r) { return S{l.a * power_ten[r.size] + r.a, l.size + r.size}; }
S e() { return S{0, 0}; }

struct F {
  mint d;
};
F composition(F l, F r) { if (l.d.val() == 0) return r; else return l; }
F id() { return F{0}; }

S mapping(F f, S x) {
  if (f.d == 0) return x;
  mint ones = (power_ten[x.size] - 1) / 9;
  return S{ ones * f.d, x.size };
}


int main2() {
  int N = nextLong();
  int Q = nextLong();

  atcoder::lazy_segtree<S, op, e, F, mapping, composition, id> seg(N);
  REP(i, N) {
    seg.set(i, S{1, 1});
  }
  REP(qi, Q) {
    int L = nextLong() - 1;
    int R = nextLong() - 1;
    int D = nextLong();
    seg.apply(L, R+1, F{D} );
    S ans = seg.all_prod();
    cout << ans.a.val() << '\n';
  }

  return 0;
}

int main() {
  power_ten[0] = 1;
  for (int i = 1; i < MAX_N; i++) {
    power_ten[i] = power_ten[i-1] * 10;
  }
#ifdef LOCAL
  for (;!cin.eof();cin>>ws)
#endif
    main2();
  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 <atcoder/all>
#include <vector>
using ll=long long;
using namespace std;
using namespace atcoder;

using mint=modint998244353;
const mint inv9=mint(1)/9;

struct S{
    mint x,w;
    S(mint x=0,mint w=1):x(x),w(w){}
};

S op(S a,S b){return S(a.x*b.w+b.x,a.w*b.w);}
S e(){return S();}
S mapping(int f,S a){
    if(f==0) return a;
    return S((a.w-1)*inv9*f,a.w);
}
int composition(int f,int g){
    if(f==0) return g;
    return f;
}
int id(){return 0;}

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

    lazy_segtree<S,op,e,int,mapping,composition,id> seg(N);
    for(int i=0;i<N;i++){
        seg.set(i,S(1,10));
    }
    int L,R,D;
    for(int i=0;i<Q;i++){
        cin>>L>>R>>D;
        L--;
        seg.apply(L,R,D);

        S ans=seg.prod(0,n);
        cout<<ans.x.val()<<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 <iostream>
#include <string>
#include <atcoder/all>
#include <vector>
using ll=long long;
using namespace std;
using namespace atcoder;

using mint=modint998244353;
const mint inv9=mint(1)/9;

struct S{
    mint x,w;
    S(mint x=0;mint w=1):x(x),w(w){}
};

S op(S a,S b){return S(a.x*b.w+b.x,a.w*b.w);}
int e(){return S();}
S mapping(int f,S a){
    if(f==0) return a;
    return S((a.w-1)*inv9*f,a.w);
}
int composition(int f,int g){
    if(f==0) return g;
    return f;
}
int id(){return 0;}

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

    lazy_segtree<int,op,e,int,mapping,composition,id> seg(N);
    for(int i=0;i<N;i++){
        seg.set(i,S(1,10));
    }
    int L,R,D;
    for(int i=0;i<Q;i++){
        cin>>L>>R>>D;
        L--;
        seg.apply(L,R,D);

        S ans=t.prod(0,n);
        cout<<ans.x.val()<<endl;
    }

    return 0;
}

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

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;

using mint = modint998244353;
const mint inv9 = mint(1)/9;

struct S {
    mint x, w;
    S(mint x=0, mint w=1):x(x),w(w) {}
};

S op(S a, S b) {
    return S(a.x*b.w + b.x, a.w*b.w);
}

S e() { return S();}

S mapping(int f, S a) {
    if (f == 0) return a;
    return S((a.w-1)*inv9*f, a.w);
}

int composition(int f, int g) {
    if (f == 0) return g;
    return f;
}

int id() { return 0;}

int main() {
    int n, q;
    cin >> n >> q;

    lazy_segtree<S,op,e,int,mapping,composition,id> t(n);
    rep(i,n) t.set(i, S(1,10));
    rep(qi,q) {
        int l, r, d;
        cin >> l >> r >> d;
        l--;
        t.apply(l,r,d);
        S ans = t.prod(0,n);
        cout << ans.x << "\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>
using namespace std;
int main(){
  int n,k;
  cin>>n>>k;
  string s=string('1',n);
  while(k-->0){
    string l=s;
    string ss="";
    
    int a,b,c;
    cin>>a>>b>>c;
    string sss=string('c',b-a+1);
    string as=l.substr(0,a-1);
    string sa=l.substr(b,s.n-b);
    ss+=as+sss+sa;
    cout<<ss<<endl;
    l=ss;}
    
  return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'n'
   15 |     string sa=l.substr(b,s.n-b);
      |                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,k;
  cin>>n>>k;
  string s=string('1',n);
  while(k-->0){
    string l=s;
    string ss="";
    
    int a,b,c;
    cin>>a>>b>>c;
    string sss=string('c',b-a+1);
    string as=l.substr(0,a-1);
    string sa=l.substr(b,s.n-b);
    ss+=as+sss+sa;
    cout<<ss<<endl;
    l=ss;
    
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'n'
   15 |     string sa=l.substr(b,s.n-b);
      |                            ^
a.cc:20:13: error: expected '}' at end of input
   20 |   return 0;}
      |             ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second
#define pb push_back
#define eb emplace_back

using ll = long long;
using vll = vector<ll>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using P = pair<int, int>;

using mint = modint998244353;

struct S {
    mint x, w;
    S(mint x = 0, mint w = 1): x(x), w(w){}
};

S op(S a, S b){ return S(a.x * b.w + b.x, a.w * b.w); }

S e() { return S(); }

S mapping(int f, S a){
    if(f == 0) return a;
    return S((a.w - 1)/9 * f, a.w);
}

int composition(int f, int g){
    if(g == 0) return f;
    return g;
}

int id(){ return 0; }

void Main(){
    int n, q; cin >> n >> q;
    lazy_segtree<S, op, e, int, mapping, composition, id> t(n);
    rep(i, n) t.set(i, S(1,10));
    while(q--){
        int l, r, d; cin >> l >> r >> d;
        l--;
        t.apply(l,r,d);
        S ans = t.all_prod();
        cout << ans.x.val() << endl;
    }
    return;
}

int main(){
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    Main();
    return 0;
}

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

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
#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;

using mint = modint998244353;

struct S {
    mint a;
    mint w;
};

struct F {
    mint d;
};

S op(S l, S r) { return  S{l.a*r.w + r.a, l.w*r.w};}

S e() { return S{0, 1}; }

S mapping(F l, S r) { 
    if(l.d == 0){
        return r;
    }else{
        return S{(l.d*(r.w - 1))/mint(9), r.w};
    }
}

F composition(F l, F r) {
    if(l.d == 0){
        return F{r.d};
    }
    return F{l.d}; 
}

F id() { return F{0};}

int main(){
    int N,Q;
    cin >> N >> Q;
    vector<int> L(Q),R(Q),D(Q);
    rep(i,Q){
        cin >> L[i] >> R[i] >> D[i];
        L[i]--;
    }
    vector<S> aaa(N);
    rep(i,N){
        aaa[i] = S{1,10};
    }
    lazy_segtree<S, op, e, F, mapping, composition, id> seg(aaa);
    //cout << seg.prod(0,2).a.val() << endl;
    rep(i,Q){
        seg.apply(L[i], R[i], F{D[i]});
        cout << seg.all_prod().a.val() << endl;
    }
    //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;

const long mod=998244353;

using ll=long long;

using S=ll;

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

ll e(){return 1LL;}

using F=ll;
  
ll mapping(ll a,ll b){return b;}
  
ll composition(ll F,ll G){return F;}
  
ll id(){return 0LL;}

int main(){
  ll N,Q;cin>>N>>Q;
  //vector<ll> S(N,1);
  
  lazy_segtree<S, op, e, F, mapping, composition, id> list(N);
  for(ll i=0;i<Q;i++){
    ll L,R,D;cin>>L>>R>>D;
    list.prod(L-1,R);
  }
  long ans=0;
  long multi=1;
  for(ll i=N-1;i>=0;i--){
    ans+=multi*list.at(i);
    ans%=mod;
    multi*=10;
    multi%=mod;
  }
  cout<<ans<<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;

const long mod=998244353;

using ll=long long;

using S=ll;

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

ll e(){return 1LL;}

using F=ll;
  
ll mapping(ll a,ll b){return b;}
  
ll composition(ll F,ll G){return F;}
  
ll id(){return 0LL;}

int main(){
  ll N,Q;cin>>N>>Q;
  //vector<ll> S(N,1);
  
  lazy_segtree<S, op, e, F, mapping, composition, id> list(N);
  for(ll i=0;i<Q;i++){
    ll L,R,D;cin>>L>>R>>D;
    list.prod(L-1,R);
  }
  long ans=0;
  long multi=1;
  for(long i=N-1;i>=0;i--){
    ans+=multi*list.at(i);
    ans%=mod;
    multi*=10;
    multi%=mod;
  }
  cout<<ans<<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;
const int MOD = 998244353;
vector<long long> ten, one;
struct S{
    long long num;
    int r;
};
S op(S a, S b){
    return S{(a.num * ten[b.r] % MOD + b.num) % MOD, a.r + b.r};
}
S e(){
    return S{0, 0};
}

using F = int;
S mapping(F f, S x){
    if(f == 0) return x;
   return S{f * one[x.r] % MOD, x.r};
}
F composition(F f, F g){
    if(f == 0) return g;
    return f;
}
F id(){
    return 0;
}


int main(){
    int N, Q;
    cin >> N >> Q;
    ten.resize(N + 1);
    one.resize(N + 1);
    long long temp = 1;
    for(int i = 0; i < N + 1; i++){
        ten[i] = temp;
        if(i == 0) one[i] = 0;
        else one[i] = (one[i - 1] * 10 + 1) % MOD; 
        temp = temp * 10 % MOD;
    }
    vector<S> v(N);
    for(int i = 0; i < N; i++) v[i] = S{1, 1};
    lazy_segtree<S, op, e, F, mapping, composition, id> segk(v);
    for(int i = 0; i < Q; i++){
        int l, r;
        long long d;
        cin >> l >> r >> d;
        l--;
        segk.apply(l, r, d);
        cout << segk.all_prod().num << endl;
    }
}

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

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define YES cout<<"YES"<<endl
#define NO cout<<"NO"<<endl
const double PI=3.14159265358979323846;
const in MOD = 998244353;
const in INF=1e18+7;
const int inf=1e9+7;
using P=pair<int,int>;
vector<int> dx={0,1,-1,0};
vector<int> dy={1,0,0,-1};
using T=tuple<int,int,int>;

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

    int n,q;
    cin>>n>>q;
    vector<P> cng(q);
    vector<int> num(q);
    rep(i,q){
        cin>>cng[i].first>>cng[i].second>>num[i];
        cng[i].first--;
        cng[i].second--;
    }

    set<T> a;
    a.emplace(n-1,0,1);
    int x=0,y,z;

    using mint=modint998244353;
    vector<mint> mo(n,0);
    mint ten=1;
    mo[n-1]=1;
    for(int i=n-2;i>=0;i--){
        ten *= 10;
        mo[i]=mo[i+1]+ten;
    }
    mo.emplace_back(0);

    mint sum=mo[0];
    int s,t,u;
    T w;
    auto v=a.lower_bound(T(x,0,0));

    rep(i,q){
        tie(x,y)=cng[i];
        z=num[i];

        v=a.lower_bound(T(x,0,0));
        if(v==a.end()){
            // t=inf;
            goto jump;
        }
        else{
            w=*v;
            tie(s,t,u)=(w); 
        }

        while(y>=t){
            v=a.erase(v);
            if(y>=s){
                if(t>=x) sum -= u*(mo[t]-mo[s+1]);
                if(t<x){
                    a.emplace(x-1,t,u);
                    sum -= u*(mo[x]-mo[s+1]);
                }
            }
            else{
                a.emplace(s,y+1,u);
                if(t>=x) sum -= u*(mo[t]-mo[y+1]);
                if(t<x){
                    sum -= u*(mo[x]-mo[y+1]);
                    a.emplace(x-1,t,u);
                }
            }
            // v=a.lower_bound(T(x,0,0));
            if(v==a.end()) break;
            else{
                w=*v;
                tie(s,t,u)=(w);
            }
        }
        jump:
        a.emplace(y,x,z);
        sum += z*(mo[x]-mo[y+1]);
        int out=sum.val();
        cout<<out<<endl;
    }
}/*
./problem.exe
*/

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

#include <bits/stdc++.h>
#include <atcoder/all>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--)
#define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++)
#define rrep2(ri,x,n) for(int ri = (int)(n-1); ri >= (int)(x); ri--)
#define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++)
#define rrepit(ritr,x) for(auto ritr = x.rbegin(); ritr != x.rend(); ritr++)
#define ALL(x) x.begin(), x.end()
using ll = long long;
using namespace std;
using namespace atcoder;
using mint = modint998244353;
const mint inv9 = mint(1)/9;

struct S{
  mint val;
  mint power;
  S(mint v = 0, mint p = 1) : val(v), power(p) {}
};

using F = int;

S op(S l, S r){
  S res;
  res.power = l.power * r.power;
  res.val = l.val*r.power + r.val;
  return res;
}

S e(){
  return S();
}

S mapping(F f, S s){
  if(f == 0) return s;
  return S((s.power-1)*inv9 * f, s.power);
}

F composition(F l, F r){
  if(l == 0) return r;
  return l;
}

F id(){
  return 0;
}


int main(){
  int n, q;
  cin >> n >> q;
  lazy_segtree<S, op, e, F, mapping, composition, id> lsg(n);
  rep(i, n){
    lsg.set(i, S(1, 10));
  }

  rep(_q, q){
    int l, r, d;
    cin >> l >> r >> d;
    l--;
    lsg.apply(l, r, d);
    S ans = lsg.all_prod();
    cout << ans.val.val() << endl;
  }
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#pragma region atcoder
#include <atcoder/all>
using namespace atcoder;
#pragma endregion
#pragma region macros
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vl = vector<ll>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rrep(i, n) for(int i = n - 1; i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#pragma endregion
#pragma region debug for var, v, vv
#define debug(var)  do{std::cout << #var << " : ";view(var);}while(0)
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){cout << endl;int cnt = 0;for(const auto& v : vv){cout << cnt << "th : "; view(v); cnt++;} cout << endl;}
#pragma endregion

const ll mod = 1000000007;
const int inf = 1001001001;
const ll INF = 1001001001001001001;
const int MAX = 2000005;
using mint = modint998244353;
constexpr mint inv9 = mint(1)/9;

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; }
ll modpow(ll a, ll p){ll ret = 1; while(p){if(p & 1){ret = ret * a % mod;} a = a * a % mod; p >>= 1;} return ret;}

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

/*-----------------------------------------------------------------------------------------------------*/
struct S {
  mint x, w;
  S(mint x=0, mint w=1):x(x),w(w) {}
};
 
S op(S a, S b) {
  return S(a.x*b.w + b.x, a.w*b.w);
}
S e() { return S();}
 
S mapping(int f, S a) {
  if (f == 0) return a;
  return S((a.w-1)*inv9* f, a.w);
}
int composition(int f, int g) {
  if (f == 0) return g;
  return f;
}
int id() { return 0;}
 

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n, q; cin >> n >> q;
	lazy_segtree<S, op, e, int, mapping, composition, id> tree(n);
	rep(i,n) tree.set(i, S(1, 10));
	rep(i,q){
		int l, r, d; cin >> l >> r >> d;
		l--;
		tree.apply(l, r, d);
		S ans = tree.prod(0,n);
		printf("%d\n", ans.x.val());
	}
}

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

#include<bits/stdc++.h>
using namespace std;
#pragma region atcoder
#include <atcoder/all>
using namespace atcoder;
#pragma endregion
#pragma region macros
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vl = vector<ll>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rrep(i, n) for(int i = n - 1; i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#pragma endregion
#pragma region debug for var, v, vv
#define debug(var)  do{std::cout << #var << " : ";view(var);}while(0)
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){cout << endl;int cnt = 0;for(const auto& v : vv){cout << cnt << "th : "; view(v); cnt++;} cout << endl;}
#pragma endregion

const ll mod = 1000000007;
const int inf = 1001001001;
const ll INF = 1001001001001001001;
const int MAX = 2000005;
using mint = modint998244353;

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; }
ll modpow(ll a, ll p){ll ret = 1; while(p){if(p & 1){ret = ret * a % mod;} a = a * a % mod; p >>= 1;} return ret;}

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

/*-----------------------------------------------------------------------------------------------------*/
struct S {
  mint x, w;
  S(mint x=0, mint w=1):x(x),w(w) {}
};
 
S op(S a, S b) {
  return S(a.x*b.w + b.x, a.w*b.w);
}
S e() { return S();}
 
S mapping(int f, S a) {
  if (f == 0) return a;
  return S((a.w-1)*inv9 * f, a.w);
}
int composition(int f, int g) {
  if (f == 0) return g;
  return f;
}
int id() { return 0;}
 

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n, q; cin >> n >> q;
	lazy_segtree<S, op, e, int, mapping, composition, id> tree(n);
	rep(i,n) tree.set(i, S(1, 10));
	rep(i,q){
		int l, r, d; cin >> l >> r >> d;
		l--;
		tree.apply(l, r, d);
		S ans = tree.prod(0,n);
		printf("%d\n", ans.x.val());
	}
}

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

#include<bits/stdc++.h>
using namespace std;
#pragma region atcoder
#include <atcoder/all>
using namespace atcoder;
#pragma endregion
#pragma region macros
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vl = vector<ll>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rrep(i, n) for(int i = n - 1; i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#pragma endregion
#pragma region debug for var, v, vv
#define debug(var)  do{std::cout << #var << " : ";view(var);}while(0)
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){cout << endl;int cnt = 0;for(const auto& v : vv){cout << cnt << "th : "; view(v); cnt++;} cout << endl;}
#pragma endregion

const ll mod = 1000000007;
const int inf = 1001001001;
const ll INF = 1001001001001001001;
const int MAX = 2000005;
using mint = modint998244353;

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; }
ll modpow(ll a, ll p){ll ret = 1; while(p){if(p & 1){ret = ret * a % mod;} a = a * a % mod; p >>= 1;} return ret;}

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

/*-----------------------------------------------------------------------------------------------------*/
struct S{
	mint x, w;
	S(mint x = 0, mint w = 1):x(x), w(w){};
};

S op(S a, S b){
	return S(a.x * b.w + b.x, a.w * b.w);
}

S e(){
	return S();
}

S mapping(int f, S a){
	if(f == 0) return a;
	else return S((a.w - 1) / 9 * f, a.w);
}

int composition(int f, int g){
	if(f == 0) return g;
	else return f;
}
int id(){
	return 0;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n, q; cin >> n >> q;
	lazy_segtree<S, op, e, int, mapping, composition, id> tree(n);
	rep(i,n) tree.set(i, S(1, 10));
	rep(i,q){
		int l, r, d; cin >> l >> r >> d;
		l--;
		tree.apply(l, r, d);
		S ans = tree.prod(0,n);
		cout << ans.x.val() << endl;
	}
}

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

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

#define ll long long
#define ld long double

#define rep(i, n) for(ll i = 0; i < n; ++i)
#define rep2(i, a, b) for(ll i = a; i <= b; ++i)
#define rrep(i, a, b) for(ll i = a; i >= b; --i)

#define pii pair<int, int>
#define pll pair<ll, ll>

#define fi first
#define se second

#define pb push_back
#define eb emplace_back

#define vi vector<int>
#define vll vector<ll>
#define vpii vector<pii>
#define vpll vector<pll>

#define all(a) a.begin(), a.end()

#define endl '\n'
using namespace std;
using namespace atcoder;

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

const ll MOD=10000007;//998244353
const ll INF=1e18;
const int inf=1e9;
const double PI=acos(-1);
int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,-1,1,1,-1};
 
const int MAX=3e5+10;

//mapping (f,x)=f(x);
//composition 関数合成
//id 恒等写像（単位元）
using mint = modint998244353;
struct S{
  mint x, w;
  S(mint x=0, mint w=1):x(x),w(w) {}//単位元的なのを事前に入れるやつ
};
S op(S a, S b){
  return S(a.x*b.w+b.x, a.w*b.w);
}
S e(){ return S();}
S mapping(int f,S a){
  if(f == 0) return a;
  return S((a.w-1)/9*f,a.w);
}
int composition(int f,int g){
  if(f == 0) return g;
  return f;
}
int id(){ return 0;}
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false); 
  
  int n,q;
  cin >> n >> q;
  
  lazy_segtree<S,op,e,int,mapping,composition,id> tree(n);
  rep(i,n) tree.set(i,S(1,10));
  
  while(q--){
    int l,r,d;
    cin >> l >> r >> d;
    l--;
    tree.apply(l,r,d);
    S ans = tree.all_prod();
    cout << ans.x.val() << endl;
  }
                       
  return 0;
}


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

#include <atcoder/lazysegtree>
#include <atcoder/modint>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
const mint dv = mint(1) / 9;
struct S { mint a, b; };
using F = int;
S op(S l, S r) { return S{l.a * (9 * r.b + 1) + r.a, l.b * (9 * r.b + 1)}; }
S e() { return S{0, 0}; }
F id() { return -1; }
S mapping(F f, S x) { return f == id() ? x : S{x.b * f, x.b}; }
F composition(F f, F g) { return f == id() ? g : f; }
main() {
    F n, q;
    cin >> n >> q;
    lazy_segtree<S, op, e, F, mapping, composition, id> seg(vector(n, S{1, 1}));
    while (q--) {
        F l, r, d;
        cin >> l >> r >> d;
        seg.apply(l - 1, r, d);
        cout << seg.all_prod().a.val() << '\n';
    }
}


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

#include<bits/stdc++.h>
#include<atcoder/lazysegtree>
#include<atcoder/modint>
using namespace atcoder;
using namespace std;
using lli = long long;
using mint = modint998244353;
#define rep(i,n) for(int i=0;i<n;i++)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

const mint inv9 = mint(1)/9;

struct S{
    mint x, w;
	S(mint x = 0, mint w = 1):x(x), w(w){}
};
using F = long long;

S op(S a, S b){ return S(a.x*b.w+b.x, a.w*b.w);}
S e(){ return S(); }
S mapping(F f, S a){
    if(f == 0) return a;
    return S((a.w-1)*inv9*f, a.w);
}
F composition(F f, F g){
	if(f == 0) return g;
	return f;
}

F id(){ return 0; }

lli n, q;

int main(void){
	cin >> n >> q;
	std::vector<S> v(n, {1, 1});
    atcoder::lazy_segtree<S, op, e, F, mapping, composition, id> seg(v);
	rep(i, n) seg.set(i, S(1, 10));
	mint ans;
	rep(i, q){
		lli l, r, d;
		cin >> l >> r >> d;
		l--;
		seg.apply(l, r, d);
		ans = seg.all_prod().x;
		printf("%d\n", ans.val());
	}
	return 0;
}


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

#include<bits/stdc++.h>
#include<atcoder/modint>
#include<atcoder/lazysegtree>

using namespace std;
using ll = long long;
using mint = atcoder::modint998244353; 
istream &operator>>(std::istream &is, mint &a){ll x;is >> x;a = mint(x);return (is);}
constexpr int LEN = 1e6;
vector<mint> ten(LEN), one(LEN);

struct S {
	mint val;
	int len;
};
using F = int;

S op(S l, S r) {return S{l.val * ten[r.len] + r.val, l.len + r.len} ;}
S e() {return S{0, 0}; }
F id() {return 0;}
S mapping(F f, S x) {
	if(f != id())return {one[x.len] * f, x.len};
	return x;
}
F composition(F l, F r) {return (l == id() ? r : l);}


int main()
{
	int N, Q;
	ten[0] = 1, one[0] = 0;
	for(int i = 1; i < LEN; i++) {
		ten[i] = ten[i - 1] * 10, one[i] = one[i - 1] * 10 + 1;
	}

	cin >> N >> Q;
	vector<S> v(N, {1, 1});
	atcoder::lazy_segtree<S, op, e, F, mapping, composition, id> tree(v);

	for(int i = 0;i < Q; i++) {
		int l, r, x; cin >> l >> r >> x;
		tree.apply(l - 1, r, x);
		cout << tree.all_prod().val.val() << endl;
	}

}

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

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

#define MOD 998244353

int n, q;
long long ans;
long long memo[200005];

long long memo1[200005];

struct node {
	int lo, hi, mid;
	long long val, lazy;
	node *l, *r;
	node(int _lo, int _hi): lo(_lo), hi(_hi), mid((_lo + _hi) / 2), val(0), lazy(-1) {
		if (lo != hi) l = new node(lo, mid), r = new node(mid + 1, hi);
	}
	void update(int s, int e, int v) {
		propo();
		if (lo > e || hi < s) return;
		if (lo >= s && hi <= e) {
			val = v * ((memo[hi - lo] * fastexp[lo - 1]) % MOD) % MOD;
			if (lo != hi) {
				l -> lazy = v, r -> lazy = v;
			}
			return;
		}
		l -> update(s, e, v), r -> update(s, e, v);
		val = (l -> val + r -> val) % MOD;
	}
	long long query(int s, int e) {
		propo();
		if (lo >= s && hi <= e) return val;
		if (s > mid) return r -> query(s, e);
		else if (e <= mid) return l -> query(s, e);
		else return (r -> query(s, e) + l -> query(s, e)) % MOD;
	}
	void propo() {
		if (lazy == -1) return;
		val = lazy * ((memo[hi - lo] * fastexp[lo - 1]) % MOD) % MOD;
		val %= MOD;
		if (lo != hi) {
			l -> lazy = lazy, r -> lazy = lazy;
		}
		lazy = -1;
	}
} *root[10];

int main() {
	scanf("%d%d", &n, &q);
	memo[0] = 1;
	fastexp[0] = 1;
	for (int i = 1; i <= n; i++) fastexp[i] = (fastexp[i - 1] * 10) % MOD;
	for (int i = 1; i <= n; i++) memo[i] = memo[i - 1] * 10 + 1, memo[i] %= MOD;
	ans = memo[n - 1];
	for (int i = 1; i < 10; i++) root[i] = new node(1, n);
	root[1] -> update(1, n, 1);
	for (int i = 0; i < q; i++) {
		int l, r, d; scanf("%d%d%d", &l, &r, &d);
		// l is smaller
		l = n - l + 1;
		r = n - r + 1;
		l ^= r;
		r ^= l;
		l ^= r;
		for (int j = 1; j < 10; j++) {
			long long cur = root[j] -> query(l, r);
			root[j] -> update(l, r, 0);
			ans -= cur;
			ans = (ans + MOD) % MOD;
		}
		ans += (d * ((memo[r - l] * fastexp[l - 1]) % MOD)) % MOD;
		ans %= MOD;
		printf("%lld\n", ans);
		root[d] -> update(l, r, d);
	}
	return 0;
}


Compiler output:
a.cc: In member function 'void node::update(int, int, int)':
a.cc:23:53: error: 'fastexp' was not declared in this scope
   23 |                         val = v * ((memo[hi - lo] * fastexp[lo - 1]) % MOD) % MOD;
      |                                                     ^~~~~~~
a.cc: In member function 'void node::propo()':
a.cc:41:48: error: 'fastexp' was not declared in this scope
   41 |                 val = lazy * ((memo[hi - lo] * fastexp[lo - 1]) % MOD) % MOD;
      |                                                ^~~~~~~
a.cc: In function 'int main()':
a.cc:53:9: error: 'fastexp' was not declared in this scope
   53 |         fastexp[0] = 1;
      |         ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <atcoder/lazysegtree>
#include <atcoder/modint>

using namespace std;

using ll = long long int;
using modint = atcoder::modint998244353;

inline void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); };
template<typename T> inline vector<T> fetch_vec(int sz) { vector<T> ret(sz); for (auto& elem : ret) cin >> elem; return ret; }

int N, Q;
struct q {int l,r,d;};
vector<q> Qs;
void input(){
    fast_io();
    cin >> N >> Q;
    Qs.resize(Q);
    for (int i = 0; i < Q; i++)
    {
        int l,r,d; cin >> l >> r >> d;
        l--, r--;
        Qs[i] = q{l,r,d};
    }
}

vector<modint> pow_10;
struct S{modint val; int sz;};
S op(S x, S y){return S{x.val*pow_10[y.sz] + y.val, x.sz + y.sz};}
S e(){return S{0, 0};}
using F = int;
S mapping(F f, S x){
    if(f!=0) return S{(pow_10[x.sz]-1)/modint(9)*f, x.sz};
    return x;
}
F composition(F f, F g){
    if(f!=0) return f;
    return g;
}
F id(){return 0;}

int solve(){
    pow_10.resize(N);
    pow_10[0] = 1;
    for (int i = 0; i < N; i++) pow_10[i+1] = pow_10[i]*10;

    vector<S> Init(N);
    for (int j = 0; j < N; j++) Init[j] = S{1, 1};    
    atcoder::lazy_segtree<S, op, e, F, mapping, composition, id> seg(Init);
    vector<modint> Ans;
    for (int i = 0; i < Q; i++)
    {
        int l, r, d;
        l = Qs[i].l;
        r = Qs[i].r;
        d = Qs[i].d;
        seg.apply(l, r + 1, d);
        modint ans = seg.all_prod().val;
        Ans.push_back(ans);
    }
    for(auto ans:Ans) cout << ans.val() << "\n";
    return 0;
}

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

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

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
 
int main() {
  int N, Q;
  cin >> N >> Q;
  
  int L, R, D;
  for (int i = 0; i < Q; i++) {
    cin >> L >> R >> D;
    
    modint S, ten;
    ten = 10;
    S = (ten.pow(N)-1)/9 + (ten.pow(R-L+1)-1)/9*D*ten.pow(N-R);
    cout << S << 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/modint>
#include <atcoder/convolution>
using namespace std;
using namespace atcoder;
 
using mint = modint998244353;

int main() {
  
  int N, Q;
  cin >> N >> Q ;
  
  vector<int8_t> G(N);
  for (int i = 0; i < N; i++) {
    G.at(i) = 1;
  }
 
  mint n, m;
  
  int L, R, D;
  for (int i = 0; i < Q; i++) {
    
    cin >> L >> R >> D;
    
    for (int j = L-1; j < R; j++) {
      G.at(j) = D;
    }
    
    n = 0;
    m = 1;
    for (int i = 0; i < N; i++) {
      n += G.at(N-1-i)*m;
      m *= 10;
    }

Compiler output:
a.cc:2:10: fatal error: atcoder/modint: No such file or directory
    2 | #include <atcoder/modint>
      |          ^~~~~~~~~~~~~~~~
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;
ll MOD = 998244353;


// rem, rightest, width
using mint = modint998244353;
using S = pair <mint, P>;
using F = int;
const F ID = -1;
S op (S a, S b) {
    if (b.second.first < 0) return a;
    if (a.second.first < 0) return b;
    if (a.second.first < b.second.first) {
        return {
            a.first * (mint)pow_mod(10, b.second.first - a.second.first, MOD) + b.first,
            P {b.second.first,
            a.second.second + b.second.second}
        };
    } else {
        return {
            b.first * (mint)pow_mod(10, a.second.first - b.second.first, MOD) + a.first,
            P {a.second.first,
            a.second.second + b.second.second}
        };
    }
}
S e (void) { return {0, P{-1, 0}}; }
S mapping (F f, S x) {
    if (f != ID)
        x.first = (mint)f * (mint)(pow_mod(10, x.second.second, MOD) - 1) / (mint)9;
    return x;
}
F composition (F f, F g) {
    return f == ID ? g : f;
}
F id (void) {
    return ID;
}

int main (void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n, q; cin >> n >> q;
    vector<S> v(n);
    rep (i, n) v[i] = S{1, P{i, 1}};
    lazy_segtree<S, op, e, F, mapping, composition, id> seg(v);
    rep (_, q) {
        auto [s, p] = seg.all_prod(); auto [rr, w] = p;
        eprintf("%8d %d %d\n", s.val(), rr, w);
        
        int l, r, d; cin >> l >> r >> d;
        seg.apply(l - 1, r, d);
        cout << get<0>(seg.all_prod()).val() << "\n";
    }
    return 0;

    /***************************************************/
    /* Use "submit code (with ACL v1)" when 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++

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
#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 = a; i >= b; --i)
#define aFOR(i, V) for (auto i : V)
#define ALL(vec) vec.begin(), vec.end()
#define rALL(vec) vec.rbegin(), vec.rend()
#define INF 1'000'000'007 // 10^9 + 7
#define MOD 1'000'000'007 // 10^9 + 7
#define lINF 1'000'000'000'000'000'007 // 10^18 + 7
// ------------------------------

int main() {
    int N, Q;
    cin >> N >> Q;
    vector<int> a(N, 1);
    REP(i, Q) {
        int L, R, D;
        cin >> L >> R >> D;
        --L, --R;
        FOR(j, L, R) a[j] = D;
        ll ans = 0;
        REP(i, N) {
            ans = (ans + pow_mod(10, N - i - 1, 998244353) * a[i]) % 998244353;
        }
        cout << ans << endl;
    }
    return 0;
}

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

#include<bits/stdc++.h>
#include<atcoder/modint>
#include<atcoder/lazysegtree>



using namespace std;
using ll = long long;

/*********************************/
template<class T> inline ostream& operator<<(ostream& os,vector<T> arr) {os << "["; for(int i = 0; i < (int)arr.size(); i++)os << arr[i] << (i == (int)arr.size() - 1 ? "]" : ",");os << endl;return os;}
template<typename A, typename B> ostream& operator<<(ostream& os, const pair<A,B>& p){os << "{" << p.first << "," << p.second << "}";return os; }
#define prvec(v) cerr<<#v<<": [";for(int __i = 0;__i < (int)(v).size(); __i++)cerr<<((v)[__i])<<(__i+1==(int)(v).size()?"]\n":",");
#define print(x) cerr<<#x<<": "<<(x)<<endl
/*********************************/

using mint = atcoder::modint998244353;
ostream &operator<<(std::ostream &os,const mint &p){return os << p.val();}
istream &operator>>(std::istream &is, mint &a){ll x;is >> x;a = mint(x);return (is);}
inline int ri() { int n; cin >> n; return n;}
const int MAX = 500000;
vector<mint> ten(MAX);
vector<mint> ele(MAX);
void init() {
	ten[0] = 1;
	ele[0] = 1;
	for(int i = 1; i < MAX; i++) {
		ten[i] = ten[i - 1] * 10;
		ele[i] = ele[i - 1] * 10 + 1;
	}
}

struct S{
    mint value;
    int size;
};
using F = mint;

const F ID = 0;

S op(S a, S b){ return {a.value * ten[b.size] + b.value, a.size+b.size}; }
S e(){ return {0, 0}; }
S mapping(F f, S x){
    if(f != ID) x.value = f*x.size;
    return x;
}
F composition(F f, F g){ return (f == ID ? g : f); }
F id(){ return ID; }




int main()
{
	init();
	int n, q; cin >> n >> q;
    vector<S> v(n + 3, {1, 1});
    atcoder::lazy_segtree<S, op, e, F, mapping, composition, id> tree(v);
	mint ans = tree.prod(0, n).value;
	print(ans);


	for(int i = 0; i < q; i++) {
		int l, r; 
		mint d; cin >> l >> r >> d;
		mint plu = (ele[n - l] - (l == 0 ? 0 : ele[n - r - 1])) * d;
		ans += plu;
		// cerr << "yay" << endl;
		ans -= tree.prod(l, r + 1).value * ten[n - r];
		// cerr << "yay2" << endl;
		tree.apply(l, r + 1, d);
		cout << ans << endl;
	}



}

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

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll=long long;
#define MOD 998244353
#define INF 10000000000

ll modpow(ll a,ll x){
  ll ret=1;
  a%=MOD;
  while(x>0){
    if(x%2==1){
      ret*=a;
    }
    ret%=MOD;
    x>>=1;
    a*=a;
    a%=MOD;
  }
  return ret;
}

ll inv(ll x){
  return modpow(x,MOD-2);
}

vector<pair<ll,bool>> tree;
vector<ll> res;
vector<ll> sum;
ll n=1;

void update(ll a,ll b,ll x,ll i,ll left,ll right){
  if(i<n-1&&tree[i].second==true){
    tree[i].second=false;
    ll x=sum[(right+left)/2]-sum[left];
    ll y=sum[right]-sum[(right+left)/2];
    ll z=x+y;
    if(z%MOD==0){
      tree[2*i+1].first=0;
      tree[2*i+2].first=0;
    }else{
      tree[2*i+1].first=(x*inv(z)%MOD)*tree[i].first%MOD;
      tree[2*i+2].first=(y*inv(z)%MOD)*tree[i].first%MOD;
    }
  }
  if(b<=left||right<=a){
    return;
  }
  if(a<=left&&right<=b){
    tree[i].first=(sum[right]-sum[left])*x%MOD;
    tree[i].second=true;
    return;
  }
  update(a,b,x,2*i+1,left,(left+right)/2);
  update(a,b,x,2*i+2,(left+right)/2,right);
  tree[i].first=tree[2*i+1].first+tree[2*i+2].first;
}

int main(){
  ll N,Q;
  cin>>N>>Q;
  while(n<N){
    n<<=1;
  }
  tree.resize(2*n-1);
  res.resize(N);
  res[N-1]=1;
  for(ll i=N-2;i>=0;i--){
    res[i]=10*res[i+1];
    res[i]%=MOD;
  }
  sum.resize(N+1,0);
  for(ll i=0;i<N;i++){
    sum[i+1]=sum[i]+res[i];
  }
  for(ll i=0;i<N;i++){
    tree[i+n-1].first=res[i];
    tree[i+n-1].second=false;
  }
  for(ll i=n-2;i>=0;i--){
    tree[i].first=tree[2*i+1].first+tree[2*i+2].first;
    tree[i].second=false;
  }

  vector<ll> L(Q),R(Q);
  vector<ll> D(Q);
  for(ll i=0;i<Q;i++){
    cin>>L[i]>>R[i]>>D[i];
    L[i]--;
  }
  for(ll i=0;i<Q;i++){
    update(L[i],R[i],D[i],0,0,n);
    ll ans=tree[0].first%MOD;
    cout<<ans<<endl;
  }

}


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

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

const long mod=998244353;

using ll=long long;

using S=ll;

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

ll e(){return 1LL;}

using F=ll;
  
ll mapping(ll a,ll b){return b;}
  
ll composition(ll F,ll G){return F;}
  
ll id(){return 0LL;}

int main(){
  ll N,Q;cin>>N>>Q;
  //vector<ll> S(N,1);
  
  lazy_segtree<S, op, e, F, mapping, composition, id> list(N);
  for(ll i=0;i<Q;i++){
    ll L,R,D;cin>>L>>R>>D;
    list.prod(L-1,R);
  }
  long ans=0;
  long multi=1;
  for(long i=N-1;i>=0;i--){
    ans+=multi*list.at(i);
    ans%=mod;
    multi*=10;
    multi%=mod;
  }
  cout<<ans<<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;
typedef long long ll;

const ll mod = 998244353;

struct mint {
    ll x;  // typedef long long ll;
    mint(ll x = 0) : x((x % mod + mod) % mod) {}
    mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }
    mint operator+(const mint a) const {
        mint res(*this);
        return res += a;
    }
    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }
    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }

    mint inv() const {
        return pow(mod - 2);
    }
    mint& operator/=(const mint a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint a) const {
        mint res(*this);
        return res /= a;
    }
};

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, q;
    cin >> n >> q;

    vector<mint> prep(n+1, mint(0));
    vector<mint> pot(n+1, mint(1));
    for (int i = 1; i <= n; ++i) {
        mint to = prep[i-1];
        to *= 10;
        to += 1;
        prep[i] = to;

        pot[i] = pot[i-1] * mint(10);
    }
    mint running = prep[n];

    while(q--) {
        int ll, rr, d;
        cin >> ll >> rr >> d;
        int l = n - rr;
        int r = n - ll + 1;
        mint tosub(running.x % pot[r].x);
        tosub -= mint(running.x % pot[l].x);
        running -= tosub;

        mint toadd = prep[r] - prep[l];
        toadd *= d;
        running += toadd;
        cout << running.x << endl;
    }
}




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