Language: C++

const int MAX_N=1<<17;
const ll INF=(1ll<<31)-1;
//update Sum Query min
class Lz_segtree{
public:
    int n;
    ll e=INF;
    ll init=0;
    vector<ll> dat,lz;
    Lz_segtree(int n_):n(n_){
        n=1;
        while(n<n_) n*=2;
        dat.resize(n*2,INF);
        lz.resize(n*2,init);
    }
    void update_f(ll& d,ll x){
        d+=x;
    }
    ll dat_propergate(ll l,ll r){
        return min(l,r);
    }
    void lz_propergate(ll& l,ll& r,ll x){
        l+=x,r+=x;
    }
    void eval(int len,int k){
        if(lz[k]!=init) update_f(dat[k],lz[k]);
        if(len>1){
            lz_propergate(lz[k*2+1],lz[k*2+2],lz[k]);
        }
        lz[k]=init;
    }
    //range [a,b)
    void update(int a,int b,int k,int l,int r,ll x){
        eval(r-l,k);
        if(r<=a||b<=l) return;
        if(a<=l&&r<=b){
            update_f(lz[k],x);
            eval(r-l,k);
        }
        else{
            update(a,b,k*2+1,l,(l+r)/2,x);
            update(a,b,k*2+2,(l+r)/2,r,x);
            dat[k]=dat_propergate(dat[2*k+1],dat[2*k+2]);
        }
    }
    //range [a,b)
    ll query(int a,int b,int k,int l,int r){
        eval(r-l,k);
        if(r<=a||b<=l) return e;
        if(a<=l&&r<=b) return dat[k];
        else{
            ll vl=query(a,b,k*2+1,l,(l+r)/2);
            ll vr=query(a,b,k*2+2,(l+r)/2,r);
            return dat_propergate(vl,vr);
        }
    }
    void update(int a,int b,ll x){
        return update(a,b,0,0,n,x);
    }
    ll query(int a,int b){
        return query(a,b,0,0,n);
    }
};

int main(){
    int n,q,c,s,t,x;
    cin>>n>>q;
    Lz_segtree seg(n);
    seg.update(0,n,-INF);
    rep(i,q){
        cin>>c;
        if(c==0){
            cin>>s>>t>>x;
            seg.update(s,t+1,x);
        }
        else{
            cin>>s>>t;
            ll ans=seg.query(s,t+1);
            cout<<ans<<endl;
        }
    }
    return 0;
}



Compiler output:
a.cc:2:7: error: 'll' does not name a type
    2 | const ll INF=(1ll<<31)-1;
      |       ^~
a.cc:7:5: error: 'll' does not name a type
    7 |     ll e=INF;
      |     ^~
a.cc:8:5: error: 'll' does not name a type
    8 |     ll init=0;
      |     ^~
a.cc:9:5: error: 'vector' does not name a type
    9 |     vector<ll> dat,lz;
      |     ^~~~~~
a.cc:16:19: error: 'll' has not been declared
   16 |     void update_f(ll& d,ll x){
      |                   ^~
a.cc:16:25: error: 'll' has not been declared
   16 |     void update_f(ll& d,ll x){
      |                         ^~
a.cc:19:5: error: 'll' does not name a type
   19 |     ll dat_propergate(ll l,ll r){
      |     ^~
a.cc:22:24: error: 'll' has not been declared
   22 |     void lz_propergate(ll& l,ll& r,ll x){
      |                        ^~
a.cc:22:30: error: 'll' has not been declared
   22 |     void lz_propergate(ll& l,ll& r,ll x){
      |                              ^~
a.cc:22:36: error: 'll' has not been declared
   22 |     void lz_propergate(ll& l,ll& r,ll x){
      |                                    ^~
a.cc:33:47: error: 'll' has not been declared
   33 |     void update(int a,int b,int k,int l,int r,ll x){
      |                                               ^~
a.cc:47:5: error: 'll' does not name a type
   47 |     ll query(int a,int b,int k,int l,int r){
      |     ^~
a.cc:57:29: error: 'll' has not been declared
   57 |     void update(int a,int b,ll x){
      |                             ^~
a.cc:60:5: error: 'll' does not name a type
   60 |     ll query(int a,int b){
      |     ^~
a.cc: In constructor 'Lz_segtree::Lz_segtree(int)':
a.cc:13:9: error: 'dat' was not declared in this scope
   13 |         dat.resize(n*2,INF);
      |         ^~~
a.cc:13:24: error: 'INF' was not declared in this scope
   13 |         dat.resize(n*2,INF);
      |                        ^~~
a.cc:14:9: error: 'lz' was not declared in this scope
   14 |         lz.resize(n*2,init);
      |         ^~
a.cc:14:23: error: 'init' was not declared in this scope; did you mean 'int'?
   14 |         lz.resize(n*2,init);
      |                       ^~~~
      |                       int
a.cc: In member function 'void Lz_segtree::eval(int, int)':
a.cc:26:12: error: 'lz' was not declared in this scope
   26 |         if(lz[k]!=init) update_f(dat[k],lz[k]);
      |            ^~
a.cc:26:19: error: 'init' was not declared in this scope; did you mean 'int'?
   26 |         if(lz[k]!=init) update_f(dat[k],lz[k]);
      |                   ^~~~
      |                   int
a.cc:26:34: error: 'dat' was not declared in this scope
   26 |         if(lz[k]!=init) update_f(dat[k],lz[k]);
      |                                  ^~~
a.cc:28:27: error: 'lz' was not declared in this scope
   28 |             lz_propergate(lz[k*2+1],lz[k*2+2],lz[k]);
      |                           ^~
a.cc:30:9: error: 'lz' was not declared in this scope
   30 |         lz[k]=init;
      |         ^~
a.cc:30:15: error: 'init' was not declared in this scope; did you mean 'int'?
   30 |         lz[k]=init;
      |               ^~~~
      |               int
a.cc: In member function 'void Lz_segtree::update(int, int, int, int, int, int)':
a.cc:37:22: error: 'lz' was not declared in this scope; did you mean 'l'?
   37 |             update_f(lz[k],x);
      |                      ^~
      |                      l
a.cc:43:13: error: 'dat' was not declared in this scope
   43 |             dat[k]=dat_propergate(dat[2*k+1],dat[2*k+2]);
      |             ^~~
a.cc:43:20: error: 'dat_propergate' was not declared in this scope; did you mean 'lz_propergate'?
   43 |             dat[k]=dat_propergate(dat[2*k+1],dat[2*k+2]);
      |                    ^~~~~~~~~~~~~~
      |                    lz_propergate
a.cc: In function 'int main()':
a.cc:67:5: error: 'cin' was not declared in this scope
   67 |     cin>>n>>q;
      |     ^~~
a.cc:69:21: error: 'INF' was not declared in this scope
   69 |     seg.update(0,n,-INF);
      |                     ^~~
a.cc:70:9: error: 'i' was not declared in this scope
   70 |     rep(i,q){
      |         ^
a.cc:70:5: error: 'rep' was not declared in this scope
   70 |     rep(i,q){
      |     ^~~