#include using namespace std; #include #include #include #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } #define rep(i,n) for (int i = 0; i < (n); ++i) typedef long long ll; typedef unsigned long long ull; using P=pair; const ll INF=1001001001; const int mod=1e9+7; void solve(){ int n,q; cin>>n>>q; vector>p(q,vector(3)); rep(i,q) {cin>>p[i][0]>>p[i][1]>>p[i][2];} sort(p.begin(),p.end()); rep(i,q-1){ if(p[i][0]==p[i+1][0]&&p[i][2],greater

>pq; int pos=1; p.push_back({INF,INF,INF}); vectorans(n+1,1e9); for(auto u:p){ int l=u[0],r=u[1],b=u[2]; while(!pq.empty()&&pos1){cout<<" ";} cout<