Submission #966616

#TimeUsernameProblemLanguageResultExecution timeMemory
966616vjudge1Trading (IZhO13_trading)C++17
0 / 100
2017 ms5776 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long ll v[300002]; int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); ll n,m; cin >> n >> m; ll x,y,z; for (int i=0;i<m;i++) { cin >> x >> y >> z; x--; y--; for (int j=0;j<=y-x;j++) { v[x+j]=max(v[x+j],z+j); } } for (int i=0;i<n;i++) { cout << v[i] <<' '; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...