Submission #1010529

#TimeUsernameProblemLanguageResultExecution timeMemory
1010529tarpentTrading (IZhO13_trading)C++14
0 / 100
2052 ms5204 KiB
#include<bits/stdc++.h> using namespace std; const int maxn = 3e5+7; int n,m,k,a,b,c; int val[maxn]; int main(){ cin>>n>>m; for(int i = 0; i<m; i++){ cin>>a>>b>>c; for(int j = a-1; j<b; j++){ val[j]=max(val[j],c); c++; } } for(int i = 0; i<n; i++){ cout<<val[i]<<' '; } }
#Verdict Execution timeMemoryGrader output
Fetching results...