Submission #1101380

#TimeUsernameProblemLanguageResultExecution timeMemory
1101380ezzzayTrading (IZhO13_trading)C++14
0 / 100
1 ms6484 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define ff first #define ss second #define pb push_back const int N=3e6; int x[N]; int l[N],r[N]; int a[N]; signed main(){ int n,m; cin>>n>>m; for(int i=1;i<=m;i++){ cin>>l[i]>>r[i]>>x[i]; a[l[i]]=max(x[i],a[l[i]]); for(int j=l[i];j<=r[i];j++){ a[j]=max(a[j],a[j-1]+1); } } for(int i=1;i<=n;i++){ cout<<a[i]<<" "; } }
#Verdict Execution timeMemoryGrader output
Fetching results...