# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
966616 | vjudge1 | Trading (IZhO13_trading) | C++17 | 2017 ms | 5776 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |