#include #include using namespace std; using namespace atcoder; struct S{ int a; }; struct F{ int a; bool f; }; S op(S a,S b){ return S{min(a.a,b.a)}; } S e(){ return S{1000000000}; } S mapping(F f,S x){ if(f.f){ return S{f.a}; } return x; } F composition(F f,F g){ if(f.f){ return f; } return g; } F id(){ return F{0,false}; } int main(){ int N,Q; cin>>N>>Q; vector>> A(Q); lazy_segtree seg(N); for(int i=0;i>A[i].second.first>>A[i].second.second>>A[i].first; A[i].second.first--; } sort(A.begin(),A.end()); for(int i=0;i