Submission #886422

#TimeUsernameProblemLanguageResultExecution timeMemory
886422karimovTrading (IZhO13_trading)C++17
0 / 100
2051 ms5472 KiB
#include <bits/stdc++.h> using namespace std; #define FAST ios_base::sync_with_stdio(false); cin.tie(NULL); #define fio(x) freopen(x".in","r",stdin);freopen(x".out","w",stdout) void YES(bool t=1){std::cout<<(t?"YES\n":"NO\n");} void NO(bool t=1){YES(!t);} const int MOD = 1000000007; //#define int long long #define pb push_back #define ll long long #define all(x) (x).begin(), (x).end() void solve() { int n,m; cin >> n >> m; vector<int> v(n+1,0); while(m--) { int a,b,c; cin >> a >> b >> c; for(int i = a; i <= b; i++) { v[i] = max(v[i],c); c++; } } for(int i = 1; i <= n; i++)cout<<v[i]<<" "; } int main() { FAST solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...